CREATE TABLE PUBLIC.TEMPLATE_ITEM
(
    TEMPLATE_ITEM_ID bigint DEFAULT (NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_FD99B1DF_38A2_4EDA_9F2F_409E5AC90637) AUTO_INCREMENT PRIMARY KEY NOT NULL,
    TEMPLATE_ID bigint DEFAULT 1,
    PID bigint DEFAULT 0,
    ITEM_NAME varchar(255),
    ITEM_VALUE clob,
    VALID_STATUS integer DEFAULT 1,
    ITEM_TYPE integer DEFAULT 1
);
COMMENT ON COLUMN PUBLIC.TEMPLATE_ITEM.ITEM_TYPE IS '条目类型. 1:目录 2:文件';
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222424, 1157235318189994435, 0, '${(sbhCtx.mvnMainJavaProjectBaseDir)!}', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222426, 1157235318189994435, 1157235320526222424, 'base', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222427, 1157235318189994435, 1157235320526222426, '${(dependencies.weixin)!}', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222428, 1157235318189994435, 1157235320526222427, 'WxAuthService.java', 'package cn.aezo.minions.utils;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.util.UriComponentsBuilder;

import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URLEncoder;
import java.util.LinkedHashMap;

@Component
public class WxAuthService {
    private Logger logger = LoggerFactory.getLogger(WxAuthService.class);

    @Autowired
    private RestTemplate restTemplate;

    //请求此地址即跳转到二维码登录界面
    private static final String AuthorizationUrl =
            "https://open.weixin.qq.com/connect/oauth2/authorize?appid=%s&redirect_uri=%s&response_type=code&scope=%s&state=%s#wechat_redirect";

    // 获取用户 openid 和 access_token 的 URL
    private static final String AccesstokeOpenidUrl =
            "https://api.weixin.qq.com/sns/oauth2/access_token?appid=%s&secret=%s&code=%s&grant_type=authorization_code";

    private static final String RefreshTokenUrl =
            "https://api.weixin.qq.com/sns/oauth2/refresh_token?appid=%s&grant_type=refresh_token&refresh_token=%s";

    private static final String UserInfoUrl =
            "https://api.weixin.qq.com/sns/userinfo?access_token=%s&openid=%s&lang=zh_CN";

    private static final String Scope = "snsapi_userinfo";

    @Value("${help.wxAppId}")
    private String wxAppId;

    @Value("${help.wxAppSecret}")
    private String wxAppSecret;

    @Value("${help.wxCallbackUrl}")
    private String wxCallbackUrl;

    public String getAuthorizationUrl() throws UnsupportedEncodingException {
        wxCallbackUrl = URLEncoder.encode(wxCallbackUrl, "utf-8");
        String url = String.format(AuthorizationUrl, wxAppId, wxCallbackUrl, Scope, System.currentTimeMillis());
        return url;
    }

    // https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxb50d02d2fd72d2d2&redirect_uri=http%3a%2f%2fxy9h4b.natappfree.cc/page/Index.html&response_type=code&scope=snsapi_userinfo&state=gzh#wechat_redirect
    // https://api.weixin.qq.com/sns/oauth2/access_token?appid=wxb50d02d2fd72d2d2&secret=60a34a5c4159d5092b9e557ac2aa63b9&code=0819ZELf1wqDLx0iy3If13gBLf19ZEL7&grant_type=authorization_code
    // {access_token=1X3GsW3imLHaFOjAvu701pASllYNG2Tl-PyzPSqfidjvCZnWdYNIPDXvvKbzeKK_6ibhtjvKMOF2ZzXJ_3uQDQ, expires_in=7200, refresh_token=iGHHuwvFnmTIJ9HmqPyPaGjTDSRYWloFkS7rn5WB6nDm3g4wAtz27eFtN-B1ajBEdKWp3g3woEYhZOmqL3lV8g, openid=oL2F31vtHbKxZxWEY0f-yOI7lIdE, scope=snsapi_userinfo}
    // userInfoStr = {openid=oL2F31vtHbKxZxWEY0f-yOI7lIdE, nickname=月星墙, sex=1, language=zh_CN, city=武汉, province=湖北, country=中国, headimgurl=http://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83erKS3ICAPZFkFyLkhfcD6Ftb0bKmG0nNE9Eusg2IXyLXrwyZID2cS9mT7TS28ecTxNh02ZouXvC8w/0, privilege=[]}
    public LinkedHashMap getUserAccessTokenAndOpenid(String code) {
        String url = String.format(AccesstokeOpenidUrl, wxAppId, wxAppSecret, code);

        UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(url);
        URI uri = builder.build().encode().toUri();

        LinkedHashMap resp = restTemplate.getForObject(uri, LinkedHashMap.class);
        logger.info("getUserAccessTokenAndOpenid resp = " + resp);

        if(resp.containsKey("errcode")) {
            throw new RuntimeException("获取token错误信息，msg = " + resp);
        } else {
            return resp;
        }
    }

    public String getOpenId(String accessToken) {
        return null;
    }

    public LinkedHashMap getUserInfo(String accessToken, String openId){
        String url = String.format(UserInfoUrl, accessToken, openId);
        UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(url);
        URI uri = builder.build().encode().toUri();

        LinkedHashMap resp = restTemplate.getForObject(uri, LinkedHashMap.class);
        logger.info("getUserInfo resp = " + resp);

        if(resp.containsKey("errcode")) {
            throw new RuntimeException("获取用户信息错误，msg = "+resp);
        } else {
            return resp;
        }
    }

    public LinkedHashMap getUserAccessTokenByRefreshToken(String refreshToken) {

        String url = String.format(RefreshTokenUrl, wxAppId, refreshToken);

        UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(url);
        URI uri = builder.build().encode().toUri();

        LinkedHashMap resp = restTemplate.getForObject(uri, LinkedHashMap.class);
        logger.info("getUserAccessTokenByRefreshToken resp = " + resp);

        if(resp.containsKey("errcode")) {
            throw new RuntimeException("重新获取AccessToken失败，msg = "+resp);
        } else {
            return resp;
        }
    }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222429, 1157235318189994435, 1157235320526222427, 'WxTemplateMsg.java', 'package cn.aezo.minions.utils;

import cn.aezo.utils.base.StringU;
import cn.aezo.utils.base.ValidU;
import cn.aezo.utils.io.HttpClientU;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service
public class WxTemplateMsg {
    @Autowired
    private WxTokenManager wxTokenManager;

    private static String protocolAndDomain;

    private static final String TEMPLATE_MSG_URL =
            "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=%s";

    /**
     * 发送模板消息
     * @param toUserOpenId 目标用户的openid
     * @param templateId 模板消息id
     * @param gotoUrl 跳转地址
     * @param data 模板参数
     */
    public Object sendMsg(String toUserOpenId, String templateId, String gotoUrl, Map data) {
        Object result = null;
        String accessToken = wxTokenManager.getAccessToken();
        if(ValidU.isEmpty(accessToken)) return result;

        String url = String.format(TEMPLATE_MSG_URL, accessToken);

        Map<String, Object> context = new HashMap<>();
        context.put("touser", toUserOpenId);
        context.put("template_id", templateId);
        context.put("url", gotoUrl);
        context.put("data", data);

        String msg = StringU.parseMap2JsonStr(context);

        String str = HttpClientU.httpRequest(url, "POST", msg);
        if(str == null) {
            return null;
        } else {
            try {
                result = StringU.parseJsonStr2Map(str);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

        return result;
    }

    public String getProtocolAndDomain() {
        return protocolAndDomain;
    }

    @Value("${help.protocolAndDomain}")
    public void setProtocolAndDomain(String protocolAndDomain) {
        this.protocolAndDomain = protocolAndDomain;
    }

    public enum Template {
        PaymentSuccess("DKuKSlWNnYD6XRtgxI_wiGvaI2CEGW-OsMddJN2GzQk", "index.html");

        private String id;
        private String url;

        Template(String id, String url) {
            this.id = id;
            this.url = url;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getUrl() {
            return protocolAndDomain + url;
        }

        public void setUrl(String url) {
            this.url = url;
        }
    }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222430, 1157235318189994435, 1157235320526222427, 'WxTokenManager.java', 'package cn.aezo.minions.utils;

import cn.aezo.utils.base.MiscU;
import cn.aezo.utils.base.ValidU;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import org.springframework.web.client.RestTemplate;

import java.util.Date;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;

@Service
public class WxTokenManager {
    private Logger logger = LoggerFactory.getLogger(WxTokenManager.class);

    @Autowired
    private RedisTemplate<String, String> redisTemplate;

    @Autowired
    private RestTemplate restTemplate;

    @Autowired
    private WxAuthService wxAuthService;

    @Value("${help.wxAppId}")
    private String wxAppId;

    @Value("${help.wxAppSecret}")
    private String wxAppSecret;

    @Value("${help.wxAccessToken}")
    private String wxAccessToken;

    @Value("${help.wxJsapiTicket}")
    private String wxJsapiTicket;

    private static final String AccesstokeUrl =
            "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s";

    private static final String JsapiTicketUrl =
            "https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=%s&type=jsapi";

    public String getAccessToken() {
        String accessToken = getRedisValueNotExpires(wxAccessToken, null);
        if(ValidU.isEmpty(accessToken)) {
            String url = String.format(AccesstokeUrl, wxAppId, wxAppSecret);

            LinkedHashMap resp = restTemplate.getForObject(url, LinkedHashMap.class);
            logger.info("getAccessToken resp = " + resp);

            if(resp.containsKey("errcode")) {
                throw new RuntimeException("获取token错误信息，msg = " + resp);
            } else {
                accessToken = (String) resp.get("access_token");
                Object expiresIn = resp.get("expires_in");
                setRedisValueWithExpires(wxAccessToken, null, accessToken, expiresIn);
            }
        }

        return accessToken;
    }

    public String getJsapiTicket(String accessToken) {
        String jsapiTicket = getRedisValueNotExpires(wxJsapiTicket, null);
        if(ValidU.isEmpty(jsapiTicket)) {
            String url = String.format(JsapiTicketUrl, accessToken);

            LinkedHashMap resp = restTemplate.getForObject(url, LinkedHashMap.class);
            logger.info("getJsSDKInfo resp = " + resp);

            if(StringUtils.isEmpty(resp.get("errmsg")) || !"ok".equals(resp.get("errmsg"))) {
                throw new RuntimeException("获取ticket错误信息，msg = " + resp);
            } else {
                jsapiTicket = (String) resp.get("ticket");
                Object expiresIn = resp.get("expires_in");
                setRedisValueWithExpires(wxAccessToken, null, jsapiTicket, expiresIn);
            }
        }

        return jsapiTicket;
    }

    public Map<String, Object> getJsSDKInfo(String accessToken) {
        Map<String, Object> retMap = new HashMap<>();

        String jsapiTicket = getJsapiTicket(accessToken);
        if(StringUtils.isEmpty(jsapiTicket)) return retMap;

        return MiscU.Instance.toMap("jsapiTicket", jsapiTicket);
    }

    public String getOpenid(String code) {
        String openid = null;
        if(StringUtils.isEmpty(code)) return openid;

        LinkedHashMap wxMap = wxAuthService.getUserAccessTokenAndOpenid(code);
        if (wxMap == null) return openid;

        openid = (String) wxMap.get("openid");

        return openid;
    }

    /**
     * 获取没有超期的值，超期返回null
     * @param redisKey
     * @param mapKey
     * @return
     */
    private String getRedisValueNotExpires(String redisKey, String mapKey) {
        String value = null;
        if(StringUtils.isEmpty(redisKey)) return value;

        long now = (new Date()).getTime();
        value = redisTemplate.opsForValue().get(redisKey);
        if(StringUtils.isEmpty(value)) return value;

        String[] arr = value.split("#");
        if(now > Long.valueOf(arr[1])) {
            return null;
        } else {
            return value;
        }
    }

    /**
     * 设置过期时间
     * @param redisKey
     * @param mapKey
     * @param value
     * @param expiresIn
     */
    private void setRedisValueWithExpires(String redisKey, String mapKey, String value, Object expiresIn) {
        String valueTemp = null;
        if (!StringUtils.isEmpty(value)) {
            valueTemp = value + "#" + getNowExpiresIn(expiresIn);
        }
        if(valueTemp == null) return;

        if(StringUtils.isEmpty(mapKey)) {
            redisTemplate.opsForValue().set(redisKey, valueTemp);
        } else {
            redisTemplate.opsForHash().put(redisKey, mapKey, valueTemp);
        }
    }

    /**
     * 获取超期时间
     * @param expiresIn
     * @return
     */
    private Long getNowExpiresIn(Object expiresIn) {
        long now = (new Date()).getTime();
        if(expiresIn == null) return now;

        Long expiresMs = Long.valueOf(String.valueOf(expiresIn)) - 15 * 60;
        return expiresMs * 1000 + now;
    }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222432, 1157235318189994435, 1157235320526222426, 'BaseKeys.java', 'package ${(projectConfig.projectPackageName)!}.base;

public class BaseKeys {
    public static final String SessionUserInfo = "_USER_INFO_";

    public static final String AccessToken = "access_token";

    public static final String RefreshToken = "refresh_token";


}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222433, 1157235318189994435, 1157235320526222426, 'config', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222434, 1157235318189994435, 1157235320526222433, 'BaseBean.java', 'package ${(projectConfig.projectPackageName)!}.base.config;

import ${(projectConfig.projectPackageName)!}.base.config.rawbean.CustomObjectMapper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.CorsConfigurationSource;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;

import java.util.Arrays;

@Configuration
public class BaseBean {
    @Bean
    CorsConfigurationSource corsConfigurationSource() {
        CorsConfiguration configuration = new CorsConfiguration();
        configuration.setAllowedOrigins(Arrays.asList("*"));
        configuration.setAllowedMethods(Arrays.asList("*"));
        configuration.setAllowedHeaders(Arrays.asList("*"));
        configuration.setAllowCredentials(true);

        UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
        source.registerCorsConfiguration("/**", configuration);
        return source;
    }

    @Bean
    public RestTemplate restTemplate() {
        RestTemplate restTemplate = new RestTemplate();
        // restTemplate.getMessageConverters().add(new WxMappingJackson2HttpMessageConverter());
        return restTemplate;
    }

    @Bean
    public CustomObjectMapper customObjectMapper() {
        return new CustomObjectMapper()
            .setNotContainNull()
            .setCamelCaseToLowerCaseWithUnderscores();
    }

    @Bean
    public MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter() {
        return new MappingJackson2HttpMessageConverter(this.customObjectMapper());
    }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222435, 1157235318189994435, 1157235320526222433, 'BaseInterceptor.java', 'package ${(projectConfig.projectPackageName)!}.base.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Configuration
public class BaseInterceptor implements HandlerInterceptor {
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
            throws Exception {
        return true;
    }

    @Override
    public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,
                           ModelAndView modelAndView) throws Exception {
        if(modelAndView == null) return;

        if(response.getStatus() == 500) {
            // modelAndView.setViewName("/error/500");
        } else if(response.getStatus() == 404) {
            // modelAndView.setViewName("/error/404");
        } else if(response.getStatus() == 403) {
            // modelAndView.setViewName("/error/403");
        }

    }

    @Override
    public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)
            throws Exception {
    }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222436, 1157235318189994435, 1157235320526222433, 'InterceptorConfig.java', 'package ${(projectConfig.projectPackageName)!}.base.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@Configuration
public class InterceptorConfig extends WebMvcConfigurerAdapter {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new BaseInterceptor()).addPathPatterns("/**");

        super.addInterceptors(registry);
    }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222437, 1157235318189994435, 1157235320526222433, 'MinionsConfig.java', 'package ${(projectConfig.projectPackageName)!}.base.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties(prefix = "minions")
public class MinionsConfig {
    private String helloWorld;

    public String getHelloWorld() {
        return helloWorld;
    }

    public void setHelloWorld(String helloWorld) {
        this.helloWorld = helloWorld;
    }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222438, 1157235318189994435, 1157235320526222433, 'rawbean', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222439, 1157235318189994435, 1157235320526222438, 'CustomObjectMapper.java', 'package ${(projectConfig.projectPackageName)!}.base.config.rawbean;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.SerializerProvider;
import org.apache.commons.lang3.StringUtils;

import java.io.IOException;
import java.text.DateFormat;
import java.text.SimpleDateFormat;

public class CustomObjectMapper extends ObjectMapper {
    public CustomObjectMapper() {
        // 进行缩进输出
        this.configure(SerializationFeature.INDENT_OUTPUT, true);
    }

    // 排除值为空属性
    public CustomObjectMapper setNotContainNull() {
        this.setSerializationInclusion(JsonInclude.Include.NON_NULL);
        return this;
    }

    // 将驼峰转为下划线
    public CustomObjectMapper setCamelCaseToLowerCaseWithUnderscores() {
        this.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);
        return this;
    }

    // 进行日期格式化
    public CustomObjectMapper setDateFormatPattern(String dateFormatPattern) {
        if (StringUtils.isNotEmpty(dateFormatPattern)) {
            DateFormat dateFormat = new SimpleDateFormat(dateFormatPattern);
            this.setDateFormat(dateFormat);
        }

        return this;
    }

    // 排除属性名为空(""/null)的字段
    public CustomObjectMapper setNotContainNullKey() {
        this.getSerializerProvider().setNullKeySerializer(new MyNullKeySerializer());
        return this;
    }

    private class MyNullKeySerializer extends JsonSerializer<Object> {
        @Override
        public void serialize(Object nullKey, JsonGenerator jsonGenerator, SerializerProvider unused) throws IOException {
            jsonGenerator.writeFieldName("");
        }
    }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222440, 1157235318189994435, 1157235320526222426, 'exception', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222441, 1157235318189994435, 1157235320526222440, 'ErrorType.java', 'package ${(projectConfig.projectPackageName)!}.base.exception;

public enum ErrorType {
    ARGUMENT_MISSING_ERROR(40014, "error.argument_missing", "Argument Missing"),

    ARGUMENT_PARSE_ERROR(40015, "error.argument_parse_error", "Argument Parse Error"),

    ARGUMENT_INVALID_ERROR(40016, "error.argument_invalid", "Argument Invalid"),

    AUTH_LOGIN_FAILED_ERROR(40100, "error.auth_login_failed", "Auth Login Failed"),

    AUTH_TOKEN_INVALID_ERROR(40105, "error.auth_token_invalid", "Auth Token Invalid"),

    METHOD_NOT_SUPPORTED_ERROR(40504, "error.method_not_supported", "Method Not Supported"),

    EXCEPTION_ERROR(50000, "error.exception", "Error"),

    UNKNOWN_EXCEPTION_ERROR(50005, "error.unknown_exception", "Unknown Exception"),

    TODO_ERROR(50008, "error.todo_error", "Todo error");

    private Integer value;
    private String errorCode;
    private String message;

    ErrorType(Integer value, String key, String message) {
        this.value = value;
        this.errorCode = key;
        this.message = message;
    }

    public Integer getValue() {
        return value;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public String getMessage() {
        return message;
    }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222442, 1157235318189994435, 1157235320526222440, 'GlobalExceptionHandlerController.java', 'package ${(projectConfig.projectPackageName)!}.base.exception;

import cn.aezo.utils.base.ExceptionU;
import cn.aezo.utils.base.JsonU;
import cn.aezo.utils.base.MiscU;
import cn.aezo.utils.base.StringU;
import ${(projectConfig.projectPackageName)!}.base.Result;
import ${(projectConfig.projectPackageName)!}.base.config.rawbean.CustomObjectMapper;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController;
import org.springframework.boot.web.servlet.error.DefaultErrorAttributes;
import org.springframework.boot.autoconfigure.web.ErrorProperties;
import org.springframework.context.MessageSource;
import org.springframework.context.NoSuchMessageException;
import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.core.env.Environment;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.ServletRequestAttributes;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Locale;
import java.util.Map;

@RestController
@ControllerAdvice
public class GlobalExceptionHandlerController extends BasicErrorController {
    private Logger logger = LoggerFactory.getLogger(GlobalExceptionHandlerController.class);

    @Autowired
    private MessageSource messageSource;

    @Autowired
    private Environment env;

    @Autowired
    private CustomObjectMapper customObjectMapper;

    public GlobalExceptionHandlerController() {
        super(new DefaultErrorAttributes(), new ErrorProperties());
    }

    // 错误映射为json，Accept-Type为application/json的
    @Override
    @RequestMapping(produces = {MediaType.APPLICATION_JSON_VALUE})
    public ResponseEntity<Map<String, Object>> error(HttpServletRequest request) {
        // TODO 404
        logger.warn(this.getErrorAttributes(request, true).toString());

        Map<String, Object> body = MiscU.Instance.toMap();
        HttpStatus status = getStatus(request);

        try {
            ServletRequestAttributes requestAttributes = new ServletRequestAttributes(request);
            Throwable throwable = getError(requestAttributes);
            if(throwable == null) {
                throwable = new ExceptionU.UnknownException("Throwable Capture Failed");
                status = HttpStatus.INTERNAL_SERVER_ERROR;
            }

            Result result = this.exception(throwable);
            String str = customObjectMapper.writeValueAsString(result);
            body = JsonU.json2map(str);
        } catch (Exception e) {
            logger.error("Failed to return error message", e);
        }

        return new ResponseEntity<>(body, status);
    }

    // 错误映射到Html，Accept-Type为text/html的
    @Override
    @RequestMapping(produces = {"text/html"})
    public ModelAndView errorHtml(HttpServletRequest request, HttpServletResponse response) {
        return super.errorHtml(request, response);
    }

    @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
    @ExceptionHandler(Exception.class)
    public Result exception(Throwable e) {
        return getExceptionResponse(ErrorType.EXCEPTION_ERROR, e);
    }

    @ResponseStatus(HttpStatus.UNAUTHORIZED)
    @ExceptionHandler(ExceptionU.AuthLoginFailedException.class)
    public Result authLoginFailedException(Throwable e) {
        return getExceptionResponse(ErrorType.AUTH_LOGIN_FAILED_ERROR, e);
    }

    @ResponseStatus(HttpStatus.UNAUTHORIZED)
    @ExceptionHandler(ExceptionU.AuthTokenInvalidException.class)
    public Result authTokenInvalidException(Throwable e) {
        return getExceptionResponse(ErrorType.AUTH_TOKEN_INVALID_ERROR, e);
    }

    @ResponseStatus(HttpStatus.METHOD_NOT_ALLOWED)
    @ExceptionHandler(ExceptionU.MethodNotSupportedException.class)
    public Result httpRequestMethodNotSupportedException(Throwable e) {
        return getExceptionResponse(ErrorType.METHOD_NOT_SUPPORTED_ERROR, e);
    }

    @ResponseStatus(HttpStatus.BAD_REQUEST)
    @ExceptionHandler(ExceptionU.ArgumentMissingException.class)
    public Result missingServletRequestParameterException(Throwable e) {
        return getExceptionResponse(ErrorType.ARGUMENT_MISSING_ERROR, e);
    }

    @ResponseStatus(HttpStatus.BAD_REQUEST)
    @ExceptionHandler(ExceptionU.ArgumentParseException.class)
    public Result httpMessageNotReadableException(Throwable e) {
        return getExceptionResponse(ErrorType.ARGUMENT_PARSE_ERROR, e);
    }

    @ResponseStatus(HttpStatus.BAD_REQUEST)
    @ExceptionHandler(ExceptionU.ArgumentInvalidException.class)
    public Result methodArgumentNotValidException(Throwable e) {
        return getExceptionResponse(ErrorType.ARGUMENT_INVALID_ERROR, e);
    }

    @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
    @ExceptionHandler(ExceptionU.UnknownException.class)
    public Result unknownException(Throwable e) {
        return getExceptionResponse(ErrorType.UNKNOWN_EXCEPTION_ERROR, e);
    }

    @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
    @ExceptionHandler(ExceptionU.TodoException.class)
    public Result todoException(Throwable e) {
        return getExceptionResponse(ErrorType.TODO_ERROR, e);
    }

    private Result getExceptionResponse(ErrorType errorType, Throwable e) {
        ExceptionInfo exceptionInfo = new ExceptionInfo();

        String localMessage = getLocalMessage(errorType);
        String exceptionMessage = e.getMessage();
        StackTraceElement[] stackTrace = e.getStackTrace();

        String[] actives = env.getActiveProfiles();
        if (actives == null || actives.length <= 0 || !"prod".equals(actives[0])) {
            if (StringUtils.isNotEmpty(localMessage)) {
                exceptionInfo.setLocalMessage(localMessage);
            }
            if (StringUtils.isNotEmpty(exceptionMessage)) {
                exceptionInfo.setExceptionMessage(exceptionMessage);
            }
            if (stackTrace != null) {
                exceptionInfo.setStackTrace(stackTrace);
            }
        } else if (e instanceof ExceptionU) {
            if (StringUtils.isNotEmpty(exceptionMessage)) {
                exceptionInfo.setExceptionMessage(exceptionMessage);
            }
        }

        logger.error(StringU.buffer(", ", errorType.getErrorCode(), errorType.getMessage(), localMessage), e);

        return Result.failure(errorType.getMessage(), exceptionInfo);
    }

    private String getLocalMessage(ErrorType errorType) {
        String localMessage = null;
        Locale locale = null;
        try {
            locale = LocaleContextHolder.getLocale();
            localMessage = messageSource.getMessage(errorType.getErrorCode(), null, locale);
        } catch (NoSuchMessageException e1) {
            logger.warn("invalid i18n! errorCode: " + errorType.getErrorCode() + ", local: " + locale);
        }

        return localMessage;
    }

    public Throwable getError(RequestAttributes requestAttributes) {
        Throwable exception = (Throwable) requestAttributes.getAttribute(DefaultErrorAttributes.class.getName() + ".ERROR", 0);
        if(exception == null) {
            exception = (Throwable) requestAttributes.getAttribute("javax.servlet.error.exception", 0);
        }

        return exception;
    }

    public class ExceptionInfo {
        private String localMessage;

        private String exceptionMessage;

        private StackTraceElement[] stackTrace;

        public String getLocalMessage() {
            return localMessage;
        }

        public void setLocalMessage(String localMessage) {
            this.localMessage = localMessage;
        }

        public String getExceptionMessage() {
            return exceptionMessage;
        }

        public void setExceptionMessage(String exceptionMessage) {
            this.exceptionMessage = exceptionMessage;
        }

        public StackTraceElement[] getStackTrace() {
            return stackTrace;
        }

        public void setStackTrace(StackTraceElement[] stackTrace) {
            this.stackTrace = stackTrace;
        }
    }
}', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222444, 1157235318189994435, 1157235320526222426, 'security', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222445, 1157235318189994435, 1157235320526222444, 'annotation', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222446, 1157235318189994435, 1157235320526222445, 'HasSuperAdminRole.java', 'package ${(projectConfig.projectPackageName)!}.base.security.annotation;

import org.springframework.security.access.prepost.PreAuthorize;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

@Retention(RetentionPolicy.RUNTIME)
@PreAuthorize("hasRole(''SUPER_ADMIN'')")
public @interface HasSuperAdminRole {
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222447, 1157235318189994435, 1157235320526222444, 'CustomAuthenticationDetailsSource.java', 'package ${(projectConfig.projectPackageName)!}.base.security;

import org.springframework.security.authentication.AuthenticationDetailsSource;
import org.springframework.security.web.authentication.WebAuthenticationDetails;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;

@Component
public class CustomAuthenticationDetailsSource implements AuthenticationDetailsSource<HttpServletRequest, WebAuthenticationDetails> {

    @Override
    public WebAuthenticationDetails buildDetails(HttpServletRequest context) {
        return new WebAuthenticationDetails(context);
    }
}', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222450, 1157235318189994435, 1157235320526222444, 'CustomWebAuthenticationDetails.java', 'package ${(projectConfig.projectPackageName)!}.base.security;

import org.springframework.security.web.authentication.WebAuthenticationDetails;

import javax.servlet.http.HttpServletRequest;

public class CustomWebAuthenticationDetails extends WebAuthenticationDetails {
    private static final long serialVersionUID = 1L;
    <#if "${(dependencies.weixin)!}" != "">private final String wxCode;</#if>

    public CustomWebAuthenticationDetails(HttpServletRequest request) {
        super(request);
        <#if "${(dependencies.weixin)!}" != "">wxCode = request.getParameter("wxCode");</#if>
    }

    <#if "${(dependencies.weixin)!}" != "">
    public String getWxCode() {
        return wxCode;
    }
    </#if>

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(super.toString())<#if "${(dependencies.weixin)!}" != "">.append("; wxCode: ").append(this.getWxCode())</#if>;
        return sb.toString();
    }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222451, 1157235318189994435, 1157235320526222444, 'filter', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222452, 1157235318189994435, 1157235320526222451, 'JwtAuthenticationFilter.java', 'package ${(projectConfig.projectPackageName)!}.base.security.filter;

import cn.aezo.utils.base.ExceptionU;
import ${(projectConfig.projectPackageName)!}.base.security.SpringSecurityConfig;
import ${(projectConfig.projectPackageName)!}.base.security.jwt.SecurityJwtTokenUtils;
import io.jsonwebtoken.SignatureException;
import org.apache.commons.lang3.StringUtils;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.web.authentication.WebAuthenticationDetailsSource;
import org.springframework.stereotype.Component;
import org.springframework.web.filter.OncePerRequestFilter;

import javax.annotation.Resource;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@Component
public class JwtAuthenticationFilter extends OncePerRequestFilter {

    private String token_header = "X-Token";

    @Resource
    private SecurityJwtTokenUtils securityJwtTokenUtils;

    @Override
    protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws ServletException, IOException {
        if(!SpringSecurityConfig.Login_Uri.equals(request.getRequestURI())) {
            String authToken = request.getHeader(this.token_header);
            if(StringUtils.isEmpty(authToken)) {
                chain.doFilter(request, response);
                return;
            }

            try {
                String username = securityJwtTokenUtils.getUsernameFromToken(authToken);
                if(username == null)
                    throw new ExceptionU.AuthTokenInvalidException();

                logger.info(String.format("Checking authentication for user %s. ExpirationDate: %s.",
                    username, securityJwtTokenUtils.getExpirationDateFromToken(authToken)));

                if (SecurityContextHolder.getContext().getAuthentication() == null) {
                    // It is not compelling necessary to load the use details from the database. You could also store the information
                    // in the token and read it from it. It''s up to you ;)
                    // UserDetails userDetails = this.userDetailsService.loadUserByUsername(username);
                    UserDetails userDetails = securityJwtTokenUtils.getUserFromToken(authToken);

                    // For simple validation it is completely sufficient to just check the token integrity. You don''t have to call
                    // the database compellingly. Again it''s up to you ;)
                    if (securityJwtTokenUtils.validateToken(authToken, userDetails)) {
                        UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken
                            (userDetails, null, userDetails.getAuthorities());
                        authentication.setDetails(new WebAuthenticationDetailsSource().buildDetails(request));
                        logger.info(String.format("Authenticated user %s, setting security context", username));
                        SecurityContextHolder.getContext().setAuthentication(authentication);
                    }
                }
            } catch (SignatureException e) {
                throw new ExceptionU.AuthTokenInvalidException();
            }
        }

        chain.doFilter(request, response);
    }

}', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222453, 1157235318189994435, 1157235320526222444, 'handler', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222454, 1157235318189994435, 1157235320526222453, 'LoginFinishHandler.java', 'package ${(projectConfig.projectPackageName)!}.base.security.handler;

import cn.aezo.utils.base.MiscU;
import cn.aezo.utils.base.ValidU;
import ${(projectConfig.projectPackageName)!}.base.BaseKeys;
import ${(projectConfig.projectPackageName)!}.base.security.jwt.JwtUserDetails;
import ${(projectConfig.projectPackageName)!}.base.security.jwt.SecurityJwtTokenUtils;
import ${(projectConfig.projectPackageName)!}.base.BaseController;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
import org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler;
import org.springframework.stereotype.Component;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;

@Component
public class LoginFinishHandler {
    private Logger logger = LoggerFactory.getLogger(LoginFinishHandler.class);

    @Autowired
    private SecurityJwtTokenUtils jwtUtils;

    @Component
    public class MyAuthenticationSuccessHandler implements AuthenticationSuccessHandler {
        @Override
        public void onAuthenticationSuccess(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Authentication authentication) throws IOException, ServletException {
            HttpSession session = httpServletRequest.getSession();
            JwtUserDetails userDetails = (JwtUserDetails) authentication.getPrincipal();
            session.setAttribute(BaseKeys.SessionUserInfo, userDetails);

            logger.info("{} 登录成功", userDetails.getUsername());

            // httpServletResponse.sendRedirect("/manage/");
            String accessToken = jwtUtils.generateAccessToken(userDetails);
            String refreshToken = jwtUtils.generateRefreshToken(userDetails);

            if(ValidU.isEmpty(accessToken) || ValidU.isEmpty(refreshToken)) {
                BaseController.writeError(httpServletResponse, "获取令牌失败");
                return;
            }

            // TODO 登录成功数据返回
            BaseController.writeSuccess(httpServletResponse, "登录成功", MiscU.Instance.toMap(
                BaseKeys.AccessToken, accessToken,
                BaseKeys.RefreshToken, refreshToken
            ));
        }
    }

    @Component
    public class MyAuthenticationFailureHandler extends SimpleUrlAuthenticationFailureHandler {
        @Override
        public void onAuthenticationFailure(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, AuthenticationException e) throws IOException, ServletException {
            logger.info("登录失败");
            BaseController.writeError(httpServletResponse, e.getMessage());
        }
    }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222455, 1157235318189994435, 1157235320526222453, 'MyAccessDeniedHandler.java', 'package ${(projectConfig.projectPackageName)!}.base.security.handler;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.web.access.AccessDeniedHandler;
import org.springframework.stereotype.Component;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@Component
public class MyAccessDeniedHandler implements AccessDeniedHandler {

    private static Logger logger = LoggerFactory.getLogger(MyAccessDeniedHandler.class);

    @Override
    public void handle(HttpServletRequest httpServletRequest,
                       HttpServletResponse httpServletResponse,
                       AccessDeniedException e) throws IOException, ServletException {

        Authentication auth = SecurityContextHolder.getContext().getAuthentication();

        if (auth != null) {
            logger.info("用户 ''" + auth.getName() + "'' 试图访问受保护的 URL: " + httpServletRequest.getRequestURI());
        }

        httpServletResponse.sendRedirect("/manage/403");
    }
}

', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222456, 1157235318189994435, 1157235320526222444, 'jwt', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222457, 1157235318189994435, 1157235320526222456, 'JwtUserDetails.java', 'package ${(projectConfig.projectPackageName)!}.base.security.jwt;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

import java.util.Collection;

public class JwtUserDetails implements UserDetails {

    private Long userId;
    private String password;
    private final String username;
    private final Collection<? extends GrantedAuthority> authorities;
    private final boolean accountNonExpired;
    private final boolean accountNonLocked;
    private final boolean credentialsNonExpired;
    private final boolean enabled;


    public JwtUserDetails(long userId, String username, String password, Collection<? extends GrantedAuthority> authorities) {
        this(userId, username, password, true, true, true, true, authorities);
    }

    public JwtUserDetails(long userId, String username, String password, boolean enabled, boolean accountNonExpired,
                          boolean credentialsNonExpired, boolean accountNonLocked,
                          Collection<? extends GrantedAuthority> authorities) {
        if (username != null && !"".equals(username) && password != null) {
            this.userId = userId;
            this.username = username;
            this.password = password;
            this.enabled = enabled;
            this.accountNonExpired = accountNonExpired;
            this.credentialsNonExpired = credentialsNonExpired;
            this.accountNonLocked = accountNonLocked;
            this.authorities = authorities;
        } else {
            throw new IllegalArgumentException("Cannot pass null or empty values to constructor");
        }
    }

    @Override
    public Collection<? extends GrantedAuthority> getAuthorities() {
        return authorities;
    }

    public long getUserId() {
        return userId;
    }

    @Override
    public String getPassword() {
        return password;
    }

    @Override
    public String getUsername() {
        return username;
    }

    @Override
    public boolean isAccountNonExpired() {
        return accountNonExpired;
    }

    @Override
    public boolean isAccountNonLocked() {
        return accountNonLocked;
    }

    @Override
    public boolean isCredentialsNonExpired() {
        return credentialsNonExpired;
    }

    @Override
    public boolean isEnabled() {
        return enabled;
    }
}', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222458, 1157235318189994435, 1157235320526222456, 'SecurityJwtTokenUtils.java', 'package ${(projectConfig.projectPackageName)!}.base.security.jwt;

import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
import io.jsonwebtoken.impl.compression.CompressionCodecs;
import org.apache.commons.codec.binary.Base64;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.stereotype.Component;

import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;

@Component
public class SecurityJwtTokenUtils {

    public static final String Role_Refresh_Token = "Role_Refresh_Token";

    private static final String Claim_Key_User_Id = "user_id";
    private static final String Claim_Key_Authorities = "scope";
    private static final String Claim_Key_Account_Enabled = "enabled";
    private static final String Claim_Key_Account_Non_Locked = "non_locked";
    private static final String Claim_Key_Account_Non_Expired = "non_expired";

    private final String secretKey = "7786df7fc3a34e26a61c034d5e888526";

    private final Long access_token_expiration = 1000L*60*60*2; // access_token 默认2小时(2*60*60*1000L millisecond)

    private final Long refresh_token_expiration = 1000L*60*60*24*7;  // refresh_token 默认7天

    private final SignatureAlgorithm signature_algorithm = SignatureAlgorithm.HS256;

    public JwtUserDetails getUserFromToken(String token) {
        final Claims claims = getClaimsFromToken(token);
        Long userId = getUserIdFromToken(token);
        String username = claims.getSubject();
        List roles = (List) claims.get(Claim_Key_Authorities);
        Collection<? extends GrantedAuthority> authorities = parseArrayToAuthorities(roles);
        boolean account_enabled = (Boolean) claims.get(Claim_Key_Account_Enabled);
        boolean account_non_locked = (Boolean) claims.get(Claim_Key_Account_Non_Locked);
        boolean account_non_expired = (Boolean) claims.get(Claim_Key_Account_Non_Expired);

        return new JwtUserDetails(userId, username, "password", account_enabled, account_non_expired, true,
                account_non_locked, authorities);
    }

    public Long getUserIdFromToken(String token) {
        final Claims claims = getClaimsFromToken(token);
        if(claims.get(Claim_Key_User_Id) == null)
            return null;
        return Long.valueOf(String.valueOf(claims.get(Claim_Key_User_Id)));
    }

    public String getUsernameFromToken(String token) {
        return getClaimsFromToken(token).getSubject();
    }

    public Date getCreatedDateFromToken(String token) {
        return getClaimsFromToken(token).getIssuedAt();
    }

    public Date getExpirationDateFromToken(String token) {
        return getClaimsFromToken(token).getExpiration();
    }

    public String generateAccessToken(UserDetails userDetails) {
        JwtUserDetails user = (JwtUserDetails) userDetails;
        Map<String, Object> claims = generateClaims(user);
        claims.put(Claim_Key_Authorities, authoritiesToArray(user.getAuthorities()));
        return generateAccessToken(user.getUsername(), claims);
    }

    public String refreshToken(String token) {
        final Claims claims = getClaimsFromToken(token);
        return generateAccessToken(claims.getSubject(), claims);
    }

    public String generateRefreshToken(UserDetails userDetails) {
        JwtUserDetails user = (JwtUserDetails) userDetails;
        Map<String, Object> claims = generateClaims(user);
        // 只授于更新 token 的权限
        String roles[] = new String[]{SecurityJwtTokenUtils.Role_Refresh_Token};
        claims.put(Claim_Key_Authorities, roles);
        return generateRefreshToken(user.getUsername(), claims);
    }

    public Boolean canTokenBeRefreshed(String token, Date lastPasswordReset) {
        final Date created = getCreatedDateFromToken(token);
        return !isCreatedBeforeLastPasswordReset(created, lastPasswordReset)
                && (!isTokenExpired(token));
    }

    public Boolean validateToken(String token, UserDetails userDetails) {
        JwtUserDetails user = (JwtUserDetails) userDetails;
        final Long userId = getUserIdFromToken(token);
        final String username = getUsernameFromToken(token);
        // final Date created = getCreatedDateFromToken(token);
        // final Date expiration = getExpirationDateFromToken(token);
        return (userId == user.getUserId()
                && username.equals(user.getUsername())
                && !isTokenExpired(token)
                /* && !isCreatedBeforeLastPasswordReset(created, userDetails.getLastPasswordResetDate()) */
        );
    }

    private Claims getClaimsFromToken(String token) {
        Claims claims = Jwts.parser()
                        .setSigningKey(generalSecretKey())
                        .parseClaimsJws(token)
                        .getBody();
        return claims;
    }

    private String generateAccessToken(String subject, Map<String, Object> claims) {
        return generateToken(subject, claims, access_token_expiration);
    }

    private String generateRefreshToken(String subject, Map<String, Object> claims) {
        return generateToken(subject, claims, refresh_token_expiration);
    }

    private Map<String, Object> generateClaims(JwtUserDetails user) {
        Map<String, Object> claims = new HashMap<>();
        claims.put(Claim_Key_User_Id, user.getUserId());
        claims.put(Claim_Key_Account_Enabled, user.isEnabled());
        claims.put(Claim_Key_Account_Non_Locked, user.isAccountNonLocked());
        claims.put(Claim_Key_Account_Non_Expired, user.isAccountNonExpired());
        return claims;
    }

    private Boolean isTokenExpired(String token) {
        final Date expiration = getExpirationDateFromToken(token);
        return expiration.before(new Date());
    }

    private Boolean isCreatedBeforeLastPasswordReset(Date created, Date lastPasswordReset) {
        return (lastPasswordReset != null && created.before(lastPasswordReset));
    }

    private List authoritiesToArray(Collection<? extends GrantedAuthority> authorities) {
        List<String> list = new ArrayList<>();
        for (GrantedAuthority ga : authorities) {
            list.add(ga.getAuthority());
        }
        return list;
    }

    private Collection<? extends GrantedAuthority> parseArrayToAuthorities(List roles) {
        Collection<GrantedAuthority> authorities = new ArrayList<>();
        SimpleGrantedAuthority authority;
        for (Object role : roles) {
            authority = new SimpleGrantedAuthority(role.toString());
            authorities.add(authority);
        }
        return authorities;
    }

    private String generateToken(String subject, Map<String, Object> claims, long expiration) {
        return Jwts.builder()
                .setClaims(claims)
                .setSubject(subject)
                .setId(UUID.randomUUID().toString())
                .setIssuedAt(new Date())
                .setExpiration(generateExpirationDate(expiration))
                .compressWith(CompressionCodecs.DEFLATE)
                .signWith(signature_algorithm, generalSecretKey())
                .compact();
    }

    private Date generateExpirationDate(long expiration) {
        return new Date(System.currentTimeMillis() + expiration * 1000);
    }

    private SecretKey generalSecretKey() {
        byte[] encodedKey = Base64.decodeBase64(secretKey);
        return new SecretKeySpec(encodedKey, 0, encodedKey.length, "AES");
    }

}', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222460, 1157235318189994435, 1157235320526222424, 'common', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222461, 1157235318189994435, 1157235320526222424, 'config', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222462, 1157235318189994435, 1157235320526222424, 'controller', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222463, 1157235318189994435, 1157235320526222462, 'OpenController.java', 'package ${(projectConfig.projectPackageName)!}.controller;

import ${(projectConfig.projectPackageName)!}.base.Result;
import cn.aezo.utils.base.DateU;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

@RestController
@RequestMapping("/api/open")
public class OpenController {

    @RequestMapping("/hello")
    public Result test() {
        return Result.success("hello minions");
    }

    @RequestMapping("/ping")
    public Result ping() {
        return Result.success(DateU.format(new Date(), "yyyy/MM/dd HH:mm:ss.SSS"));
    }
}', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222464, 1157235318189994435, 1157235320526222424, 'dao', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222465, 1157235318189994435, 1157235320526222424, 'entity', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222466, 1157235318189994435, 1157235320526222424, 'service', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222467, 1157235318189994435, 1157235320526222424, 'utils', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222468, 1157235318189994435, 0, '${(sbhCtx.mvnMainResourcesDir)!}', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222469, 1157235318189994435, 1157235320526222468, 'application-dev.yml', 'spring:
  datasource:
    url: ${(projectConfig.databaseUrl)!''jdbc:mysql://localhost/minionsdemo?useUnicode=true&characterEncoding=utf-8&useSSL=false''}

server:
  port: ${(projectConfig.serverPort)!''8080''}', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222470, 1157235318189994435, 1157235320526222468, 'application-prod.yml', 'spring:
  datasource:
    url: ${(projectConfig.databaseUrl)!''jdbc:mysql://localhost/minionsdemo?useUnicode=true&characterEncoding=utf-8''}

server:
  port: ${(projectConfig.serverPort)!''8080''}', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222471, 1157235318189994435, 1157235320526222468, 'application-test.yml', 'spring:
  datasource:
    url: ${(projectConfig.databaseUrl)!''jdbc:mysql://localhost/minionsdemo?useUnicode=true&characterEncoding=utf-8''}

server:
  port: ${(projectConfig.serverPort)!''8080''}', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222473, 1157235318189994435, 1157235320526222468, 'i18n', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222474, 1157235318189994435, 1157235320526222473, 'messages.properties', '', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222475, 1157235318189994435, 1157235320526222473, 'messages_zh_CN.properties', 'error.argument_missing=缺少必须参数
error.argument_parse_error=参数解析
error.argument_invalid=无效参数
error.auth_login_failed=登录失败
error.auth_token_invalid=无效的Token
error.method_not_supported=无相应服务
error.todo_error=待完善异常
error.exception=运行错误
error.unknown_exception=未知错误', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222477, 1157235318189994435, 1157235320526222468, 'mapper', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222478, 1157235318189994435, 1157235320526222468, 'sql', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222479, 1157235318189994435, 1157235320526222468, 'static', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222480, 1157235318189994435, 1157235320526222468, 'templates', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222481, 1157235318189994435, 1157235320526222480, 'error', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222482, 1157235318189994435, 1157235320526222480, 'includes', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222483, 1157235318189994435, 1157235320526222480, 'pages', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222484, 1157235318189994435, 0, '${(sbhCtx.mvnTestJavaProjectBaseDir)!}', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222486, 1157235318189994435, 1157235320526222484, 'dao', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222487, 1157235318189994435, 1157235320526222484, 'service', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222472, 1157235318189994435, 1157235320526222468, 'application.yml', 'server:
  port: ${(projectConfig.serverPort)!''8080''}

spring:
  profiles:
    active: dev
  datasource:
    url: ${(projectConfig.databaseUrl)!''jdbc:mysql://localhost:3306/minionsdemo?useUnicode=true&characterEncoding=utf-8&useSSL=false''}
    username: ${(projectConfig.databaseUsername)!''root''}
    password: ${(projectConfig.databasePassword)!''root''}
    driver-class-name: ${(projectConfig.databaseDriver)!''com.mysql.jdbc.Driver''}
  messages:
    basename: i18n/messages', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222489, 1157235318189994435, 0, '${(sbhCtx.renderNotRender)!}mvnw', '#!/bin/sh
# ----------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
# ----------------------------------------------------------------------------

# ----------------------------------------------------------------------------
# Maven2 Start Up Batch script
#
# Required ENV vars:
# ------------------
#   JAVA_HOME - location of a JDK home dir
#
# Optional ENV vars
# -----------------
#   M2_HOME - location of maven2''s installed home dir
#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
#     e.g. to debug Maven itself, use
#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
# ----------------------------------------------------------------------------

if [ -z "$MAVEN_SKIP_RC" ] ; then

  if [ -f /etc/mavenrc ] ; then
    . /etc/mavenrc
  fi

  if [ -f "$HOME/.mavenrc" ] ; then
    . "$HOME/.mavenrc"
  fi

fi

# OS specific support.  $var _must_ be set to either true or false.
cygwin=false;
darwin=false;
mingw=false
case "`uname`" in
  CYGWIN*) cygwin=true ;;
  MINGW*) mingw=true;;
  Darwin*) darwin=true
    # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
    # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
    if [ -z "$JAVA_HOME" ]; then
      if [ -x "/usr/libexec/java_home" ]; then
        export JAVA_HOME="`/usr/libexec/java_home`"
      else
        export JAVA_HOME="/Library/Java/Home"
      fi
    fi
    ;;
esac

if [ -z "$JAVA_HOME" ] ; then
  if [ -r /etc/gentoo-release ] ; then
    JAVA_HOME=`java-config --jre-home`
  fi
fi

if [ -z "$M2_HOME" ] ; then
  ## resolve links - $0 may be a link to maven''s home
  PRG="$0"

  # need this for relative symlinks
  while [ -h "$PRG" ] ; do
    ls=`ls -ld "$PRG"`
    link=`expr "$ls" : ''.*-> \(.*\)$''`
    if expr "$link" : ''/.*'' > /dev/null; then
      PRG="$link"
    else
      PRG="`dirname "$PRG"`/$link"
    fi
  done

  saveddir=`pwd`

  M2_HOME=`dirname "$PRG"`/..

  # make it fully qualified
  M2_HOME=`cd "$M2_HOME" && pwd`

  cd "$saveddir"
  # echo Using m2 at $M2_HOME
fi

# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
  [ -n "$M2_HOME" ] &&
    M2_HOME=`cygpath --unix "$M2_HOME"`
  [ -n "$JAVA_HOME" ] &&
    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
  [ -n "$CLASSPATH" ] &&
    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
fi

# For Migwn, ensure paths are in UNIX format before anything is touched
if $mingw ; then
  [ -n "$M2_HOME" ] &&
    M2_HOME="`(cd "$M2_HOME"; pwd)`"
  [ -n "$JAVA_HOME" ] &&
    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
  # TODO classpath?
fi

if [ -z "$JAVA_HOME" ]; then
  javaExecutable="`which javac`"
  if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : ''\([^ ]*\)''`" = "no" ]; then
    # readlink(1) is not available as standard on Solaris 10.
    readLink=`which readlink`
    if [ ! `expr "$readLink" : ''\([^ ]*\)''` = "no" ]; then
      if $darwin ; then
        javaHome="`dirname \"$javaExecutable\"`"
        javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
      else
        javaExecutable="`readlink -f \"$javaExecutable\"`"
      fi
      javaHome="`dirname \"$javaExecutable\"`"
      javaHome=`expr "$javaHome" : ''\(.*\)/bin''`
      JAVA_HOME="$javaHome"
      export JAVA_HOME
    fi
  fi
fi

if [ -z "$JAVACMD" ] ; then
  if [ -n "$JAVA_HOME"  ] ; then
    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
      # IBM''s JDK on AIX uses strange locations for the executables
      JAVACMD="$JAVA_HOME/jre/sh/java"
    else
      JAVACMD="$JAVA_HOME/bin/java"
    fi
  else
    JAVACMD="`which java`"
  fi
fi

if [ ! -x "$JAVACMD" ] ; then
  echo "Error: JAVA_HOME is not defined correctly." >&2
  echo "  We cannot execute $JAVACMD" >&2
  exit 1
fi

if [ -z "$JAVA_HOME" ] ; then
  echo "Warning: JAVA_HOME environment variable is not set."
fi

CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher

# traverses directory structure from process work directory to filesystem root
# first directory with .mvn subdirectory is considered project base directory
find_maven_basedir() {

  if [ -z "$1" ]
  then
    echo "Path not specified to find_maven_basedir"
    return 1
  fi

  basedir="$1"
  wdir="$1"
  while [ "$wdir" != ''/'' ] ; do
    if [ -d "$wdir"/.mvn ] ; then
      basedir=$wdir
      break
    fi
    # workaround for JBEAP-8937 (on Solaris 10/Sparc)
    if [ -d "${wdir}" ]; then
      wdir=`cd "$wdir/.."; pwd`
    fi
    # end of workaround
  done
  echo "${basedir}"
}

# concatenates all lines of a file
concat_lines() {
  if [ -f "$1" ]; then
    echo "$(tr -s ''\n'' '' '' < "$1")"
  fi
}

BASE_DIR=`find_maven_basedir "$(pwd)"`
if [ -z "$BASE_DIR" ]; then
  exit 1;
fi

export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
echo $MAVEN_PROJECTBASEDIR
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"

# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
  [ -n "$M2_HOME" ] &&
    M2_HOME=`cygpath --path --windows "$M2_HOME"`
  [ -n "$JAVA_HOME" ] &&
    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
  [ -n "$CLASSPATH" ] &&
    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
  [ -n "$MAVEN_PROJECTBASEDIR" ] &&
    MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
fi

WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain

exec "$JAVACMD" \
  $MAVEN_OPTS \
  -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
  "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
  ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222488, 1157235318189994435, 0, '${(sbhCtx.renderNotRender)!}.gitignore', 'target/
!.mvn/wrapper/maven-wrapper.jar

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr

### NetBeans ###
nbproject/private/
build/
nbbuild/
dist/
nbdist/
.nb-gradle/

### Minions ###
LOG_PATH_IS_UNDEFINED', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222490, 1157235318189994435, 0, '${(sbhCtx.renderNotRender)!}mvnw.cmd', '@REM ----------------------------------------------------------------------------
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements.  See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership.  The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License.  You may obtain a copy of the License at
@REM
@REM    http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied.  See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM ----------------------------------------------------------------------------

@REM ----------------------------------------------------------------------------
@REM Maven2 Start Up Batch script
@REM
@REM Required ENV vars:
@REM JAVA_HOME - location of a JDK home dir
@REM
@REM Optional ENV vars
@REM M2_HOME - location of maven2''s installed home dir
@REM MAVEN_BATCH_ECHO - set to ''on'' to enable the echoing of the batch commands
@REM MAVEN_BATCH_PAUSE - set to ''on'' to wait for a key stroke before ending
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
@REM     e.g. to debug Maven itself, use
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
@REM ----------------------------------------------------------------------------

@REM Begin all REM lines with ''@'' in case MAVEN_BATCH_ECHO is ''on''
@echo off
@REM enable echoing my setting MAVEN_BATCH_ECHO to ''on''
@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%

@REM set %HOME% to equivalent of $HOME
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")

@REM Execute a user defined script before this one
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
:skipRcPre

@setlocal

set ERROR_CODE=0

@REM To isolate internal variables from possible post scripts, we use another setlocal
@setlocal

@REM ==== START VALIDATION ====
if not "%JAVA_HOME%" == "" goto OkJHome

echo.
echo Error: JAVA_HOME not found in your environment. >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error

:OkJHome
if exist "%JAVA_HOME%\bin\java.exe" goto init

echo.
echo Error: JAVA_HOME is set to an invalid directory. >&2
echo JAVA_HOME = "%JAVA_HOME%" >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error

@REM ==== END VALIDATION ====

:init

@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
@REM Fallback to current working directory if not found.

set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir

set EXEC_DIR=%CD%
set WDIR=%EXEC_DIR%
:findBaseDir
IF EXIST "%WDIR%"\.mvn goto baseDirFound
cd ..
IF "%WDIR%"=="%CD%" goto baseDirNotFound
set WDIR=%CD%
goto findBaseDir

:baseDirFound
set MAVEN_PROJECTBASEDIR=%WDIR%
cd "%EXEC_DIR%"
goto endDetectBaseDir

:baseDirNotFound
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
cd "%EXEC_DIR%"

:endDetectBaseDir

IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig

@setlocal EnableExtensions EnableDelayedExpansion
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%

:endReadAdditionalConfig

SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"

set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain

%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
if ERRORLEVEL 1 goto error
goto end

:error
set ERROR_CODE=1

:end
@endlocal & set ERROR_CODE=%ERROR_CODE%

if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
@REM check for post script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
:skipRcPost

@REM pause the script if MAVEN_BATCH_PAUSE is set to ''on''
if "%MAVEN_BATCH_PAUSE%" == "on" pause

if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%

exit /B %ERROR_CODE%
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222448, 1157235318189994435, 1157235320526222444, 'CustomAuthenticationProvider.java', 'package ${(projectConfig.projectPackageName)!}.base.security;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.AuthenticationProvider;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;

import java.util.List;

@Component
public class CustomAuthenticationProvider implements AuthenticationProvider {
    @Autowired
    private CustomUserDetailsService customUserDetailsService;

    @Autowired
    private PasswordEncoder passwordEncoder;

    public CustomAuthenticationProvider() {
        super();
    }

    @Override
    public Authentication authenticate(final Authentication authentication) throws AuthenticationException {
        final String username = authentication.getName();
        final String password = authentication.getCredentials().toString();

        if((StringUtils.isEmpty(username) || StringUtils.isEmpty(password))
            <#if "${(dependencies.weixin)!}" != ""> && StringUtils.isEmpty(wxCode)</#if>) {
            throw new BadCredentialsException("invalid params: username,password<#if "${(dependencies.weixin)!}" != ""> and wxCode are</#if> invalid");
        }

        UserDetails userDetails = null;
        if(!StringUtils.isEmpty(username) && !StringUtils.isEmpty(password)) {
            try {
                userDetails = customUserDetailsService.loadUserByUsername(username);

                if(userDetails == null || userDetails.getPassword() == null) {
                    throw new BadCredentialsException("invalid password");
                }
                if(!passwordEncoder.matches(password, userDetails.getPassword())) {
                    throw new BadCredentialsException("wrong password");
                }
            } catch (UsernameNotFoundException e) {
                e.printStackTrace();
            }
        }

        <#if "${(dependencies.weixin)!}" != "">
        if(userDetails == null) {
            CustomWebAuthenticationDetails details = (CustomWebAuthenticationDetails) authentication.getDetails();
            final String wxCode = details.getWxCode();
            if(!StringUtils.isEmpty(wxCode)) {
                String openid = tokenManager.getOpenid(wxCode);
                principal = customUserDetailsService.loadUserByOpenid(openid);
            }
        }
        </#if>

        if(userDetails != null) {
            final List<GrantedAuthority> grantedAuths = (List<GrantedAuthority>) userDetails.getAuthorities();
            final Authentication auth = new UsernamePasswordAuthenticationToken(userDetails, password, grantedAuths);
            return auth;
        }

        return null;
    }

    @Override
    public boolean supports(final Class<?> authentication) {
        return authentication.equals(UsernamePasswordAuthenticationToken.class);
    }
}', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222485, 1157235318189994435, 1157235320526222484, '${(sbhCtx.baseApplicationName)!}ApplicationTests.java', 'package ${projectConfig.projectPackageName};

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest
public class ${(sbhCtx.baseApplicationName)!}ApplicationTests {

	@Test
	public void contextLoads() {
	}

}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222425, 1157235318189994435, 1157235320526222424, '${(sbhCtx.baseApplicationName)!}Application.java', 'package ${projectConfig.projectPackageName};

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
@MapperScan({"${sbhCtx.baseDaoPackagePath}"})
public class ${(sbhCtx.baseApplicationName)!}Application {

    public static void main(String[] args) {
        SpringApplication.run(${(sbhCtx.baseApplicationName)!}Application.class, args);
    }
}', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222491, 1157235318189994435, 0, 'pom.xml', '<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>${(projectConfig.projectPackageName)!}</groupId>
    <artifactId>${(projectConfig.projectName)!}</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>${(projectConfig.projectName)!}</name>
    <description>generated by minions</description>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.1.RELEASE</version>
        <relativePath/>
    </parent>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
    </properties>

    <repositories>
        <repository>
            <id>oldinaction-maven-repo</id>
            <url>https://raw.github.com/oldinaction/maven-repo/master/</url>
        </repository>
    </repositories>

    <dependencies>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <!-- DB start -->
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-boot-starter</artifactId>
            <version>3.0.6</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
        </dependency>
        <!-- DB end -->

        <#if "${(sbhCtx.addonSecurityType)!}" == "SpringSecurity">
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        </#if>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>

        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt</artifactId>
            <version>0.6.0</version>
        </dependency>


        <dependency>
            <groupId>cn.aezo</groupId>
            <artifactId>utils</artifactId>
            <version>sm-minions-1.1</version>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.16.20</version>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
        </plugins>

        <resources>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.*</include>
                </includes>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
            </resource>
            <resource>
                <directory>${r"${project.basedir}"}/src/main/resources</directory>
                <filtering>true</filtering>
                <excludes>
                    <exclude>**/*.woff</exclude>
                    <exclude>**/*.ttf</exclude>
                </excludes>
            </resource>
            <resource>
                <directory>${r"${project.basedir}"}/src/main/resources</directory>
                <filtering>false</filtering>
                <includes>
                    <include>**/*.woff</include>
                    <include>**/*.ttf</include>
                </includes>
            </resource>
        </resources>
    </build>
</project>
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222476, 1157235318189994435, 1157235320526222468, '${(sbhCtx.renderNotRender)!}logback-spring.xml', '<?xml version="1.0" encoding="UTF-8" ?>
<configuration scan="true" scanPeriod="60 seconds" debug="false">
    <!--<include resource="org/springframework/boot/logging/logback/base.xml"/>-->
    <conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" />
    <conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" />
    <conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" />

    <springProperty scope="context" name="springApplicationName" source="spring.application.name"/>
    <property name="LOG_PATH" value="${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp/app/logs}}}" />
    <property name="STDOUT_LOG_PATTERN" value="${CONSOLE_LOG_PATTERN:-%clr(%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
    <property name="LOG_FILE_MAX_HISTORY" value="${LOG_FILE_MAX_HISTORY:-7}"/>
    <property name="LOG_FILE_MAX_SIZE" value="${LOG_FILE_MAX_SIZE:-10MB}"/>

    <!-- 控制台输出日志 -->
    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>${STDOUT_LOG_PATTERN}</pattern>
        </encoder>
    </appender>

    <!-- ERROR级别日志 -->
    <appender name="ERROR" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <filter class="ch.qos.logback.classic.filter.LevelFilter">
            <level>ERROR</level>
            <onMatch>ACCEPT</onMatch>
            <onMismatch>DENY</onMismatch>
        </filter>
        <!-- 最常用的滚动策略，它根据时间来制定滚动策略.既负责滚动也负责出发滚动 -->
        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
            <!--日志输出位置, 可相对和绝对路径 -->
            <fileNamePattern>${LOG_PATH}/%d{yyyyMMdd}/error-%i.log</fileNamePattern>
            <!-- 可选节点，控制保留的归档文件的最大数量，超出数量就删除旧文件假设设置每个月滚动，且<maxHistory>是3，
            则只保存最近3个月的文件，删除之前的旧文件。注意，删除旧文件是，那些为了归档而创建的目录也会被删除-->
            <maxFileSize>${LOG_FILE_MAX_SIZE}</maxFileSize>
            <maxHistory>${LOG_FILE_MAX_HISTORY}</maxHistory>
        </rollingPolicy>

        <encoder>
            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n</pattern>
        </encoder>
    </appender>

    <!-- WARN级别日志 appender -->
    <appender name="WARN" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <filter class="ch.qos.logback.classic.filter.LevelFilter">
            <level>WARN</level>
            <onMatch>ACCEPT</onMatch>
            <onMismatch>DENY</onMismatch>
        </filter>
        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
            <fileNamePattern>${LOG_PATH}/%d{yyyyMMdd}/warn-%i.log</fileNamePattern>
            <maxFileSize>${LOG_FILE_MAX_SIZE}</maxFileSize>
            <maxHistory>${LOG_FILE_MAX_HISTORY}</maxHistory>
        </rollingPolicy>
        <encoder>
            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n</pattern>
        </encoder>
    </appender>

    <!-- INFO级别日志 appender -->
    <appender name="INFO" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <filter class="ch.qos.logback.classic.filter.LevelFilter">
            <level>INFO</level>
            <onMatch>ACCEPT</onMatch>
            <onMismatch>DENY</onMismatch>
        </filter>
        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
            <fileNamePattern>${LOG_PATH}/%d{yyyyMMdd}/info-%i.log</fileNamePattern>
            <maxFileSize>${LOG_FILE_MAX_SIZE}</maxFileSize>
            <maxHistory>${LOG_FILE_MAX_HISTORY}</maxHistory>
        </rollingPolicy>
        <encoder>
            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n</pattern>
        </encoder>
    </appender>

    <!-- DEBUG级别日志 appender。如果root中不使用此appender则可将其注释掉 -->
    <appender name="DEBUG" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <filter class="ch.qos.logback.classic.filter.LevelFilter">
            <level>DEBUG</level>
            <onMatch>ACCEPT</onMatch>
            <onMismatch>DENY</onMismatch>
        </filter>
        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
            <fileNamePattern>${LOG_PATH}/%d{yyyyMMdd}/debug-%i.log</fileNamePattern>
            <maxFileSize>${LOG_FILE_MAX_SIZE}</maxFileSize>
            <maxHistory>${LOG_FILE_MAX_HISTORY}</maxHistory>
        </rollingPolicy>
        <encoder>
            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n</pattern>
        </encoder>
    </appender>

    <!-- TRACE级别日志 appender -->
    <appender name="TRACE" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <filter class="ch.qos.logback.classic.filter.LevelFilter">
            <level>TRACE</level>
            <onMatch>ACCEPT</onMatch>
            <onMismatch>DENY</onMismatch>
        </filter>
        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
            <fileNamePattern>${LOG_PATH}/%d{yyyyMMdd}/trace-%i.log</fileNamePattern>
            <maxFileSize>${LOG_FILE_MAX_SIZE}</maxFileSize>
            <maxHistory>${LOG_FILE_MAX_HISTORY}</maxHistory>
        </rollingPolicy>
        <encoder>
            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n</pattern>
        </encoder>
    </appender>

    <!--输出到mysql数据库的appender配置. 需要pom中引入mysql的jar包，并创建数据库logback_data，并需要先创建数据库表-->
    <!--
    <appender name="DB" class="ch.qos.logback.classic.db.DBAppender">
        <connectionSource
                class="ch.qos.logback.core.db.DriverManagerConnectionSource">
            <driverClass>com.mysql.jdbc.Driver</driverClass>
            <url>jdbc:mysql://localhost:3306/logback_data?characterEncoding=utf8</url>
            <user>root</user>
            <password>root</password>
        </connectionSource>
    </appender>
    -->

    <logger name="org.apache.catalina.startup.DigesterFactory" level="ERROR"/>
    <logger name="org.apache.catalina.util.LifecycleBase" level="ERROR"/>
    <logger name="org.apache.coyote.http11.Http11NioProtocol" level="WARN"/>
    <logger name="org.apache.sshd.common.util.SecurityUtils" level="WARN"/>
    <logger name="org.apache.tomcat.util.net.NioSelectorPool" level="WARN"/>
    <logger name="org.eclipse.jetty.util.component.AbstractLifeCycle" level="ERROR"/>
    <logger name="org.hibernate.validator.internal.util.Version" level="WARN"/>

    <!--<logger name="org.hibernate" level="ERROR"/>-->
    <!--<logger name="org.springframework" level="ERROR"/>-->
    <!--<logger name="org.apache.zookeeper" level="ERROR"/>-->
    <!--<logger name="com.netflix" level="ERROR"/>-->

	<!-- hibernate日志输入 -->
	<!-- <logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="TRACE" />
	<logger name="org.hibernate.type.descriptor.sql.BasicExtractor" level="TRACE" />
	<logger name="org.hibernate.SQL" level="INFO" />
	<logger name="org.hibernate.engine.QueryParameters" level="INFO" />
	<logger name="org.hibernate.engine.query.HQLQueryPlan" level="INFO" /> -->

    <!--mybatis打印日志，此时是debug级别，则会生成到debug-%i.log的文件中-->
    <!-- <logger name="cn.aezo.video.dao" level="DEBUG"/> -->

    <root level="WARN">
		<!--输出到数据库-->
        <!--<appender-ref ref="DB"/>-->

        <!-- 控制台输出 -->
        <appender-ref ref="STDOUT" />

        <!-- 文件输出：如果使用文件输出，则下面的打开级别的才会记录 -->
        <appender-ref ref="ERROR" />
        <appender-ref ref="INFO" />
        <appender-ref ref="WARN" />
        <!-- <appender-ref ref="DEBUG" /> -->
        <!--<appender-ref ref="TRACE" />-->
    </root>
</configuration>', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222449, 1157235318189994435, 1157235320526222444, 'CustomUserDetailsService.java', 'package ${(projectConfig.projectPackageName)!}.base.security;

import ${(projectConfig.projectPackageName)!}.base.security.jwt.JwtUserDetails;
import ${(sbhCtx.baseDaoPackagePath)!}.UserMapper;
import ${(sbhCtx.baseEntityPackagePath)!}.User;
import cn.aezo.utils.base.MiscU;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Component;

import java.util.Collection;
import java.util.List;

@Component
public class CustomUserDetailsService implements UserDetailsService {
    private final UserMapper userMapper;

    @Autowired
    public CustomUserDetailsService(UserMapper userMapper) {
        this.userMapper = userMapper;
    }

    @Override
    public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
        if(username == null || "".equals(username)) {
            throw new UsernameNotFoundException("invalid username " + username);
        }

        List<User> users = userMapper.selectByMap(MiscU.Instance.toMap("username", username));
        if(users == null || users.size() != 1) {
            throw new UsernameNotFoundException("Could not find user " + username);
        }

        User user = users.get(0);

        return new JwtUserDetails(
            user.getId(),
            user.getUsername(),
            user.getPassword(),
            AuthorityUtils.createAuthorityList("ROLE_" + user.getRoleCode())
        );

        // return new CustomUserDetails(users.get(0));
    }

    <#if "${(dependencies.weixin)!}" != "">
    public UserDetails loadUserByOpenid(String openid) throws UsernameNotFoundException {
        if(openid == null || "".equals(openid)) {
            throw new UsernameNotFoundException("invalid openid");
        }

        UserExample userExample = new UserExample();
        userExample.createCriteria().andOpenidEqualTo(openid);
        List<User> users = userMapper.selectByExample(userExample);
        if(user == null) {
            throw new UsernameNotFoundException("Could not find user by openid: " + openid);
        }

        return new JwtUserDetails(user.getId(), user.getUsername(), user.getPassword(),
        AuthorityUtils.createAuthorityList("ROLE_" + user.getRoleCode()));

        // return new CustomUserDetails(users.get(0));
    }
    </#if>

    private final static class CustomUserDetails extends User implements UserDetails {
        private CustomUserDetails(User user) {
            super();
          	<#if "${(properties.userFields)!}" != "">
            	<#list properties.userFields?if_exists as item>
            this.set${item}(user.get${item}());
            	</#list>
            </#if>
        }

        @Override
        public Collection<? extends GrantedAuthority> getAuthorities() {
            return AuthorityUtils.createAuthorityList("ROLE_" + this.getRoleCode());
        }

        @Override
        public boolean isAccountNonExpired() {
            return true;
        }

        @Override
        public boolean isAccountNonLocked() {
            return true;
        }

        @Override
        public boolean isCredentialsNonExpired() {
            return true;
        }

        @Override
        public boolean isEnabled() {
            return true;
        }

        private static final long serialVersionUID = 5639683223516504866L;
    }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222520, 1157235318189994467, 0, '.editorconfig', '# http://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
insert_final_newline = false
trim_trailing_whitespace = false
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222521, 1157235318189994467, 0, '.env.development', '# just a flag
ENV = ''development''

# base api
VUE_APP_BASE_API = ''/dev-api''

# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
# to control whether the babel-plugin-dynamic-import-node plugin is enabled.
# It only does one thing by converting all import() to require().
# This configuration can significantly increase the speed of hot updates,
# when you have a large number of pages.
# Detail:  https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/babel-preset-app/index.js

VUE_CLI_BABEL_TRANSPILE_MODULES = true
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222522, 1157235318189994467, 0, '.env.production', '# just a flag
ENV = ''production''

# base api
VUE_APP_BASE_API = ''/prod-api''

', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222523, 1157235318189994467, 0, '.env.staging', 'NODE_ENV = production

# just a flag
ENV = ''staging''

# base api
VUE_APP_BASE_API = ''/stage-api''

', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222524, 1157235318189994467, 0, '.eslintignore', 'build/*.js
src/assets
public
dist
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222525, 1157235318189994467, 0, '.eslintrc.js', 'module.exports = {
  root: true,
  parserOptions: {
    parser: ''babel-eslint'',
    sourceType: ''module''
  },
  env: {
    browser: true,
    node: true,
    es6: true,
  },
  extends: [''plugin:vue/recommended'', ''eslint:recommended''],

  // add your custom rules here
  //it is base on https://github.com/vuejs/eslint-config-vue
  rules: {
    "vue/max-attributes-per-line": [2, {
      "singleline": 10,
      "multiline": {
        "max": 1,
        "allowFirstLine": false
      }
    }],
    "vue/singleline-html-element-content-newline": "off",
    "vue/multiline-html-element-content-newline":"off",
    "vue/name-property-casing": ["error", "PascalCase"],
    "vue/no-v-html": "off",
    ''accessor-pairs'': 2,
    ''arrow-spacing'': [2, {
      ''before'': true,
      ''after'': true
    }],
    ''block-spacing'': [2, ''always''],
    ''brace-style'': [2, ''1tbs'', {
      ''allowSingleLine'': true
    }],
    ''camelcase'': [0, {
      ''properties'': ''always''
    }],
    ''comma-dangle'': [2, ''never''],
    ''comma-spacing'': [2, {
      ''before'': false,
      ''after'': true
    }],
    ''comma-style'': [2, ''last''],
    ''constructor-super'': 2,
    ''curly'': [2, ''multi-line''],
    ''dot-location'': [2, ''property''],
    ''eol-last'': 2,
    ''eqeqeq'': ["error", "always", {"null": "ignore"}],
    ''generator-star-spacing'': [2, {
      ''before'': true,
      ''after'': true
    }],
    ''handle-callback-err'': [2, ''^(err|error)$''],
    ''indent'': [2, 2, {
      ''SwitchCase'': 1
    }],
    ''jsx-quotes'': [2, ''prefer-single''],
    ''key-spacing'': [2, {
      ''beforeColon'': false,
      ''afterColon'': true
    }],
    ''keyword-spacing'': [2, {
      ''before'': true,
      ''after'': true
    }],
    ''new-cap'': [2, {
      ''newIsCap'': true,
      ''capIsNew'': false
    }],
    ''new-parens'': 2,
    ''no-array-constructor'': 2,
    ''no-caller'': 2,
    ''no-console'': ''off'',
    ''no-class-assign'': 2,
    ''no-cond-assign'': 2,
    ''no-const-assign'': 2,
    ''no-control-regex'': 0,
    ''no-delete-var'': 2,
    ''no-dupe-args'': 2,
    ''no-dupe-class-members'': 2,
    ''no-dupe-keys'': 2,
    ''no-duplicate-case'': 2,
    ''no-empty-character-class'': 2,
    ''no-empty-pattern'': 2,
    ''no-eval'': 2,
    ''no-ex-assign'': 2,
    ''no-extend-native'': 2,
    ''no-extra-bind'': 2,
    ''no-extra-boolean-cast'': 2,
    ''no-extra-parens'': [2, ''functions''],
    ''no-fallthrough'': 2,
    ''no-floating-decimal'': 2,
    ''no-func-assign'': 2,
    ''no-implied-eval'': 2,
    ''no-inner-declarations'': [2, ''functions''],
    ''no-invalid-regexp'': 2,
    ''no-irregular-whitespace'': 2,
    ''no-iterator'': 2,
    ''no-label-var'': 2,
    ''no-labels'': [2, {
      ''allowLoop'': false,
      ''allowSwitch'': false
    }],
    ''no-lone-blocks'': 2,
    ''no-mixed-spaces-and-tabs'': 2,
    ''no-multi-spaces'': 2,
    ''no-multi-str'': 2,
    ''no-multiple-empty-lines'': [2, {
      ''max'': 1
    }],
    ''no-native-reassign'': 2,
    ''no-negated-in-lhs'': 2,
    ''no-new-object'': 2,
    ''no-new-require'': 2,
    ''no-new-symbol'': 2,
    ''no-new-wrappers'': 2,
    ''no-obj-calls'': 2,
    ''no-octal'': 2,
    ''no-octal-escape'': 2,
    ''no-path-concat'': 2,
    ''no-proto'': 2,
    ''no-redeclare'': 2,
    ''no-regex-spaces'': 2,
    ''no-return-assign'': [2, ''except-parens''],
    ''no-self-assign'': 2,
    ''no-self-compare'': 2,
    ''no-sequences'': 2,
    ''no-shadow-restricted-names'': 2,
    ''no-spaced-func'': 2,
    ''no-sparse-arrays'': 2,
    ''no-this-before-super'': 2,
    ''no-throw-literal'': 2,
    ''no-trailing-spaces'': 2,
    ''no-undef'': 2,
    ''no-undef-init'': 2,
    ''no-unexpected-multiline'': 2,
    ''no-unmodified-loop-condition'': 2,
    ''no-unneeded-ternary'': [2, {
      ''defaultAssignment'': false
    }],
    ''no-unreachable'': 2,
    ''no-unsafe-finally'': 2,
    ''no-unused-vars'': [2, {
      ''vars'': ''all'',
      ''args'': ''none''
    }],
    ''no-useless-call'': 2,
    ''no-useless-computed-key'': 2,
    ''no-useless-constructor'': 2,
    ''no-useless-escape'': 0,
    ''no-whitespace-before-property'': 2,
    ''no-with'': 2,
    ''one-var'': [2, {
      ''initialized'': ''never''
    }],
    ''operator-linebreak'': [2, ''after'', {
      ''overrides'': {
        ''?'': ''before'',
        '':'': ''before''
      }
    }],
    ''padded-blocks'': [2, ''never''],
    ''quotes'': [2, ''single'', {
      ''avoidEscape'': true,
      ''allowTemplateLiterals'': true
    }],
    ''semi'': [2, ''never''],
    ''semi-spacing'': [2, {
      ''before'': false,
      ''after'': true
    }],
    ''space-before-blocks'': [2, ''always''],
    ''space-before-function-paren'': [2, ''never''],
    ''space-in-parens'': [2, ''never''],
    ''space-infix-ops'': 2,
    ''space-unary-ops'': [2, {
      ''words'': true,
      ''nonwords'': false
    }],
    ''spaced-comment'': [2, ''always'', {
      ''markers'': [''global'', ''globals'', ''eslint'', ''eslint-disable'', ''*package'', ''!'', '','']
    }],
    ''template-curly-spacing'': [2, ''never''],
    ''use-isnan'': 2,
    ''valid-typeof'': 2,
    ''wrap-iife'': [2, ''any''],
    ''yield-star-spacing'': [2, ''both''],
    ''yoda'': [2, ''never''],
    ''prefer-const'': 2,
    ''no-debugger'': process.env.NODE_ENV === ''production'' ? 2 : 0,
    ''object-curly-spacing'': [2, ''always'', {
      objectsInObjects: false
    }],
    ''array-bracket-spacing'': [2, ''never'']
  }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222526, 1157235318189994467, 0, '.gitignore', '.DS_Store
node_modules/
dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
package-lock.json
tests/**/coverage/

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222527, 1157235318189994467, 0, '.travis.yml', 'language: node_js
node_js: 10
script: npm run test
notifications:
  email: false
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222528, 1157235318189994467, 0, 'babel.config.js', 'module.exports = {
  presets: [
    ''@vue/app''
  ]
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222529, 1157235318189994467, 0, 'build', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222530, 1157235318189994467, 1157235320526222529, 'index.js', 'const { run } = require(''runjs'')
const chalk = require(''chalk'')
const config = require(''../vue.config.js'')
const rawArgv = process.argv.slice(2)
const args = rawArgv.join('' '')

if (process.env.npm_config_preview || rawArgv.includes(''--preview'')) {
  const report = rawArgv.includes(''--report'')

  run(`vue-cli-service build ${args}`)

  const port = 9526
  const publicPath = config.publicPath

  var connect = require(''connect'')
  var serveStatic = require(''serve-static'')
  const app = connect()

  app.use(
    publicPath,
    serveStatic(''./dist'', {
      index: [''index.html'', ''/'']
    })
  )

  app.listen(port, function () {
    console.log(chalk.green(`> Preview at  http://localhost:${port}${publicPath}`))
    if (report) {
      console.log(chalk.green(`> Report at  http://localhost:${port}${publicPath}report.html`))
    }

  })
} else {
  run(`vue-cli-service build ${args}`)
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222531, 1157235318189994467, 0, 'jest.config.js', 'module.exports = {
  moduleFileExtensions: [''js'', ''jsx'', ''json'', ''vue''],
  transform: {
    ''^.+\\.vue$'': ''vue-jest'',
    ''.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$'':
      ''jest-transform-stub'',
    ''^.+\\.jsx?$'': ''babel-jest''
  },
  moduleNameMapper: {
    ''^@/(.*)$'': ''<rootDir>/src/$1''
  },
  snapshotSerializers: [''jest-serializer-vue''],
  testMatch: [
    ''**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)''
  ],
  collectCoverageFrom: [''src/utils/**/*.{js,vue}'', ''!src/utils/auth.js'', ''!src/utils/request.js'', ''src/components/**/*.{js,vue}''],
  coverageDirectory: ''<rootDir>/tests/unit/coverage'',
  // ''collectCoverage'': true,
  ''coverageReporters'': [
    ''lcov'',
    ''text-summary''
  ],
  testURL: ''http://localhost/''
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222532, 1157235318189994467, 0, 'LICENSE', 'MIT License

Copyright (c) 2017-present PanJiaChen

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222533, 1157235318189994467, 0, 'mock', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222534, 1157235318189994467, 1157235320526222533, 'index.js', 'import Mock from ''mockjs''
import { param2Obj } from ''../src/utils''

import user from ''./user''
import table from ''./table''

const mocks = [
  ...user,
  ...table
]

// for front mock
// please use it cautiously, it will redefine XMLHttpRequest,
// which will cause many of your third-party libraries to be invalidated(like progress event).
export function mockXHR() {
  // mock patch
  // https://github.com/nuysoft/Mock/issues/300
  Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send
  Mock.XHR.prototype.send = function() {
    if (this.custom.xhr) {
      this.custom.xhr.withCredentials = this.withCredentials || false

      if (this.responseType) {
        this.custom.xhr.responseType = this.responseType
      }
    }
    this.proxy_send(...arguments)
  }

  function XHR2ExpressReqWrap(respond) {
    return function(options) {
      let result = null
      if (respond instanceof Function) {
        const { body, type, url } = options
        // https://expressjs.com/en/4x/api.html#req
        result = respond({
          method: type,
          body: JSON.parse(body),
          query: param2Obj(url)
        })
      } else {
        result = respond
      }
      return Mock.mock(result)
    }
  }

  for (const i of mocks) {
    Mock.mock(new RegExp(i.url), i.type || ''get'', XHR2ExpressReqWrap(i.response))
  }
}

// for mock server
const responseFake = (url, type, respond) => {
  return {
    url: new RegExp(`/mock${url}`),
    type: type || ''get'',
    response(req, res) {
      res.json(Mock.mock(respond instanceof Function ? respond(req, res) : respond))
    }
  }
}

export default mocks.map(route => {
  return responseFake(route.url, route.type, route.response)
})
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222535, 1157235318189994467, 1157235320526222533, 'mock-server.js', 'const chokidar = require(''chokidar'')
const bodyParser = require(''body-parser'')
const chalk = require(''chalk'')
const path = require(''path'')

const mockDir = path.join(process.cwd(), ''mock'')

function registerRoutes(app) {
  let mockLastIndex
  const { default: mocks } = require(''./index.js'')
  for (const mock of mocks) {
    app[mock.type](mock.url, mock.response)
    mockLastIndex = app._router.stack.length
  }
  const mockRoutesLength = Object.keys(mocks).length
  return {
    mockRoutesLength: mockRoutesLength,
    mockStartIndex: mockLastIndex - mockRoutesLength
  }
}

function unregisterRoutes() {
  Object.keys(require.cache).forEach(i => {
    if (i.includes(mockDir)) {
      delete require.cache[require.resolve(i)]
    }
  })
}

module.exports = app => {
  // es6 polyfill
  require(''@babel/register'')

  // parse app.body
  // https://expressjs.com/en/4x/api.html#req.body
  app.use(bodyParser.json())
  app.use(bodyParser.urlencoded({
    extended: true
  }))

  const mockRoutes = registerRoutes(app)
  var mockRoutesLength = mockRoutes.mockRoutesLength
  var mockStartIndex = mockRoutes.mockStartIndex

  // watch files, hot reload mock server
  chokidar.watch(mockDir, {
    ignored: /mock-server/,
    ignoreInitial: true
  }).on(''all'', (event, path) => {
    if (event === ''change'' || event === ''add'') {
      try {
        // remove mock routes stack
        app._router.stack.splice(mockStartIndex, mockRoutesLength)

        // clear routes cache
        unregisterRoutes()

        const mockRoutes = registerRoutes(app)
        mockRoutesLength = mockRoutes.mockRoutesLength
        mockStartIndex = mockRoutes.mockStartIndex

        console.log(chalk.magentaBright(`\n > Mock Server hot reload success! changed  ${path}`))
      } catch (error) {
        console.log(chalk.redBright(error))
      }
    }
  })
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222536, 1157235318189994467, 1157235320526222533, 'table.js', 'import Mock from ''mockjs''

const data = Mock.mock({
  ''items|30'': [{
    id: ''@id'',
    title: ''@sentence(10, 20)'',
    ''status|1'': [''published'', ''draft'', ''deleted''],
    author: ''name'',
    display_time: ''@datetime'',
    pageviews: ''@integer(300, 5000)''
  }]
})

export default [
  {
    url: ''/table/list'',
    type: ''get'',
    response: config => {
      const items = data.items
      return {
        code: 20000,
        data: {
          total: items.length,
          items: items
        }
      }
    }
  }
]
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222537, 1157235318189994467, 1157235320526222533, 'user.js', '
const tokens = {
  admin: {
    token: ''admin-token''
  },
  editor: {
    token: ''editor-token''
  }
}

const users = {
  ''admin-token'': {
    roles: [''admin''],
    introduction: ''I am a super administrator'',
    avatar: ''https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif'',
    name: ''Super Admin''
  },
  ''editor-token'': {
    roles: [''editor''],
    introduction: ''I am an editor'',
    avatar: ''https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif'',
    name: ''Normal Editor''
  }
}

export default [
  // user login
  {
    url: ''/user/login'',
    type: ''post'',
    response: config => {
      const { username } = config.body
      const token = tokens[username]

      // mock error
      if (!token) {
        return {
          code: 60204,
          message: ''Account and password are incorrect.''
        }
      }

      return {
        code: 20000,
        data: token
      }
    }
  },

  // get user info
  {
    url: ''/user/info\.*'',
    type: ''get'',
    response: config => {
      const { token } = config.query
      const info = users[token]

      // mock error
      if (!info) {
        return {
          code: 50008,
          message: ''Login failed, unable to get user details.''
        }
      }

      return {
        code: 20000,
        data: info
      }
    }
  },

  // user logout
  {
    url: ''/user/logout'',
    type: ''post'',
    response: _ => {
      return {
        code: 20000,
        data: ''success''
      }
    }
  }
]
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222538, 1157235318189994467, 0, 'package.json', '{
  "name": "vue-admin-template",
  "version": "4.2.1",
  "description": "A vue admin template with Element UI & axios & iconfont & permission control & lint",
  "author": "Pan <panfree23@gmail.com>",
  "license": "MIT",
  "scripts": {
    "dev": "vue-cli-service serve",
    "build:prod": "vue-cli-service build",
    "build:stage": "vue-cli-service build --mode staging",
    "preview": "node build/index.js --preview",
    "lint": "eslint --ext .js,.vue src",
    "test:unit": "jest --clearCache && vue-cli-service test:unit",
    "test:ci": "npm run lint && npm run test:unit",
    "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml"
  },
  "dependencies": {
    "axios": "0.18.1",
    "element-ui": "2.7.2",
    "js-cookie": "2.2.0",
    "normalize.css": "7.0.0",
    "nprogress": "0.2.0",
    "path-to-regexp": "2.4.0",
    "vue": "2.6.10",
    "vue-router": "3.0.6",
    "vuex": "3.1.0"
  },
  "devDependencies": {
    "@babel/core": "7.0.0",
    "@babel/register": "7.0.0",
    "@vue/cli-plugin-babel": "3.6.0",
    "@vue/cli-plugin-eslint": "^3.9.1",
    "@vue/cli-plugin-unit-jest": "3.6.3",
    "@vue/cli-service": "3.6.0",
    "@vue/test-utils": "1.0.0-beta.29",
    "autoprefixer": "^9.5.1",
    "babel-core": "7.0.0-bridge.0",
    "babel-eslint": "10.0.1",
    "babel-jest": "23.6.0",
    "chalk": "2.4.2",
    "connect": "3.6.6",
    "eslint": "5.15.3",
    "eslint-plugin-vue": "5.2.2",
    "html-webpack-plugin": "3.2.0",
    "mockjs": "1.0.1-beta3",
    "node-sass": "^4.9.0",
    "runjs": "^4.3.2",
    "sass-loader": "^7.1.0",
    "script-ext-html-webpack-plugin": "2.1.3",
    "script-loader": "0.7.2",
    "serve-static": "^1.13.2",
    "svg-sprite-loader": "4.1.3",
    "svgo": "1.2.2",
    "vue-template-compiler": "2.6.10"
  },
  "engines": {
    "node": ">=8.9",
    "npm": ">= 3.0.0"
  },
  "browserslist": [
    "> 1%",
    "last 2 versions"
  ]
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222539, 1157235318189994467, 0, 'postcss.config.js', '// https://github.com/michael-ciniawsky/postcss-load-config

module.exports = {
  ''plugins'': {
    // to edit target browsers: use "browserslist" field in package.json
    ''autoprefixer'': {}
  }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222540, 1157235318189994467, 0, 'public', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222541, 1157235318189994467, 1157235320526222540, 'favicon.ico', '    ��     (    (   �                �  �                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ��L ��N ��O ��O ��O ��O ��O ��O ��O ��O ��O ��O ��P ��O ��@                                                                                                                                                                                                                                                                                                                                                                                                                                                         ��N ��O ��O ��O ��K��O	��O��O��O��O��O��O��O��O��O��P��P��R ��O ��O ��N ��M ��L                                                                                                                                                                                                                                                                                                                                                                                                                         ��B ��M ��P ��Q ��O��O%��O9��O]��O���O���O���OǍ�Oҍ�O֎�OǍ�O���O���O���Oy��OZ��N=��O.��O��N��[ ��O ��O ��O ��Q                                                                                                                                                                                                                                                                                                                                                                                                         ��Q ��P ��K��P0��O]��O���OǍ�O��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O܍�O���O���Ol��OJ��O-��N��M ��O ��O ��D                                                                                                                                                                                                                                                                                                                                                                                     ��F ��M ��R��OJ��O���Oʍ�O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��OǍ�O���Oz��OK��P�Ƃ ��N ��K  �                                                                                                                                                                                                                                                                                                                                                                  ��P ��M ��H��NC��O���Oߍ�O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���NW��L~�G��P ��N ��O ��I                                                                                                                                                                                                                                                                                                                                         ��G ��L ��S��N��O��Oߍ�O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��OЍ�O���PE��O��N��T ��N ��L                                                                                                                                                                                                                                                                                                                                 ��M ��A��O1��N���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��Oō�Om��N''��N��R ��N ��L                                                                                                                                                                                                                                                                                                                     ��N ��J��ND��O̍�O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���Oݍ�O���O?��M��P ��N 8�                                                                                                                                                                                                                                                                                                              ��L��OQ��Oڍ�O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��O���OO��M��Q ��M                                                                                                                                                                                                                                                                                                     ��N ��OF��O׍�O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��O���OX��L��N ��I                                                                                                                                                                                                                                                                                     ��K ��O ��N2��Oō�O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��O���N`��J��O��G ��N ��S                                                                                                                                                                                                                                                                     ��6 ��O��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��O���Oa��O��N��N ��L ��@                                                                                                                                                                                                                                                         ��O ��K��Nn��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��Oč�O^��O��H��O ��K                                                                                                                                                                                                                                                 r�0 ��R��N0��Oٍ�O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���Oō�Nf��N%r� ��N ��Q                                                                                                                                                                                                                                         ��� ��J��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���Ni��N ��N ��N                                                                                                                                                                                                                                     ��M ��N;��O��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���Of��N��O ��O                                                                                                                                                                                                                             ��N��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��O���OQ��O	��L��O ��G                                                                                                                                                                                                             ��J ��N-��OՍ�O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��O���N6��N��S ��M                                                                                                                                                                                                         ��v ��Ou��O��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���L�~�G�{�F�{�F�{�F�{�F�{�F�{�F�~�G���M���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��O}��M"��E��P ��R                                                                                                                                                                                                 ��O��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���N�s�B�]J6�]J6�^J6�^J6�^J6�^J6�]I6�aS8�~�G���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O�NZ��P��N ��P                                                                                                                                                                                             ��OA��Oڍ�O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���M�r~A�he<�`O7�\G6�]I6�]I6�]I6�]I6�\G5�py@���M���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��O���O=��R��P                                                                                                                                                                                     ��N ��Or��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O�u�C�mq>���J�z�E�if<�^M7�]I6�]I6�]I6�]H6�`Q8���H���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���OԎ�Ow��P��O ��E                                                                                                                                                                             ��N��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���J�dZ:�aS8��G���O���L�ln>�]J6�]I6�]I6�]I6�\G6�y�D���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��O���OB��L��Q ��R ��l                                                                                                                                                                 ��N-��Oȍ�O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O�qz@�]J6�]I6�mp>���M���K�hd<�]H6�]I6�]I6�]I6�]H6�ns?���M���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���OጿOs��O}�C ��P                                                                                                                                                             ��M ��OI��O��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���M�ig<�\G6�]I6�_N7�f`:�ih=�cW9�]J6�]I6�]I6�]I6�]I6�aT8���J���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���P3��R��O                                                                                                                                                         ��M��Ne��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���I�e\:�\G6�]H6�\F5�\H6�_N7�`P8�]J6�]I6�]I6�]I6�]I6�^K6�u�C���N���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���OӍ�O[��O��O                                                                                                                                                     ��M��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O�v�C�^L7�]H6�aT8�ov?�e]:�]H6�]I6�]I6�]I6�]I6�]I6�]I6�]J6�nt?���N���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��O���O��O ��S                                                                                                                                             ��O��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���K�gb;�\G6�]I6�aR8�mq>�dZ:�]H6�]I6�]I6�]I6�]I6�]I6�]I6�]I6�cY9���K���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O/��T��S                                                                                                                                         ��O!��Oč�O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���N�w�C�]J6�]I6�]I6�]I6�]H6�]I6�]I6�]I6�]I6�]I6�]I6�]I6�]I6�]I6�^K6�q{A���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���Oƍ�PB��P��N                                                                                                                                     ��N(��O׍�O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���K�hd;�\H6�]I6�]I6�]I6�]I6�]I6�]I6�]I6�]I6�]I6�]I6�]I6�]I6�]I6�]I6�jj=���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���Oڍ�OV��N��N                                                                                                                                 ��O0��O��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���J�`Q8�]I6�]I6�]I6�]I6�]I6�]I6�]I6�]I6�]I6�]I6�]I6�]I6�]I6�]I6�]H6�e]:���K���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��Nh��N��N                                                                                                                             ��O5��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O�y�E�^K6�]I6�]I6�]I6�]I6�]I6�]I6�]H6�]H6�]I6�]I6�]I6�]I6�]I6�]I6�]I6�^K6�qz@���N���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��Nv��N��N                                                                                                                         ��O7��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���K�e\:�]I6�]I6�]I6�]I6�]I6�]I6�]H6�cW9�dZ9�^K6�]I6�]I6�]I6�]I6�]I6�]I6�\G5�he<���L���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��Nv��M��O                                                                                                                     ��O7��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O�~�G�^K6�]I6�]I6�]I6�]I6�]I6�]I6�\G6�mp>�|�F�cY9�]H6�]I6�]I6�]I6�]I6�]I6�\G6�ga;���K���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��On��O	��K ��Q                                                                                                             ��O7��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O�x�D�^K6�]I6�]I6�]I6�]I6�]I6�]I6�\G6�ot?���L�r|A�^K6�]I6�]I6�]I6�]I6�]I6�]H6�_M7�v�C���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��N[��O��R                                                                                                             ��O7��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���M�ji=�]J6�]I6�]I6�]I6�]I6�]I6�]I6�\G6�nr?���M���H�_O7�]I6�]I6�]I6�]I6�]I6�]I6�\G6�ig<���K���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���Oތ�PBx�e                                                                                                             ��O7��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O�|�F�`P8�]I6�]I6�]I6�]I6�]I6�]I6�]I6�\G5�q{A���N���M�bU8�]I6�]I6�]I6�]I6�]I6�]I6�\G6�f_;���J���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���OŌ�O*��P                                                                                                         ��O7��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O�v�C�_M7�]I6�]I6�]I6�]I6�]I6�]I6�]H6�aS8�}�F���O���N�ov@�]I6�]I6�]I6�]I6�]I6�]I6�]I6�_M7�z�E���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���P��M                                                                                                     ��O7��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���M�ig<�]I6�]I6�]I6�]I6�]I6�]I6�]I6�]I6�nt?���N���O���O���I�`R8�]I6�]I6�]I6�]I6�]I6�]I6�\G6�ih=���L���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��Om��M                                                                                                    ��O5��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O�y�E�`P8�]H6�]I6�]I6�]I6�]I6�]I6�]H6�cW9��H���P���O���O���L�e^:�]I6�]I6�]I6�]I6�]I6�]I6�]I6�^L7���I���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���Oҍ�O4��N                                                                                                 ��O0��O��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���P�ou?�\G6�]I6�]I6�]I6�]I6�]I6�^K6�bV8�x�D���N���O���O���O���L�hb;�]H6�]I6�]I6�]I6�]I6�]I6�]I6�]J6�|�F���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���N��N                                                                                             ��O)��Oڍ�O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���M�ji=�\F5�]I6�]I6�]I6�]I6�]I6�ga;���H���N���O���O���O���O���M�px@�]H6�]I6�]I6�]I6�]I6�]I6�]I6�]I6�ih=���M���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��N8��M                                                                                            ��O$��Oˍ�O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O�|�F�aS8�]H6�]I6�]I6�]I6�]I6�]I6�`O7�qz@���L���O���O���O���O���O���H�aT8�]H6�]I6�]I6�]I6�]I6�]I6�]I6�^M7�~�G���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���N
��M                                                                                         ��O��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O�r}A�\F5�]I6�]I6�]I6�]I6�]I6�]I6�]H6�aR8��H���O���O���O���O���O���L�ji=�\G6�]I6�]I6�]I6�]I6�]I6�]I6�]J6�kk=���K���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���Oލ�O&��M                                                                                         ��N��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���M�ns?�\F5�]I6�]I6�]I6�]I6�]I6�]I6�]I6�he<���L���O���O���O���O���O���N�r~A�\G5�]I6�]I6�]I6�]I6�]I6�]I6�]I6�_N7�z�E���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���Nj��N                                                                                        ��L	��N���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���H�cW9�]H6�]I6�]I6�]I6�]I6�]I6�]I6�^M7�y�D���O���O���O���O���O���O���O��G�bV8�]H6�]I6�]I6�]I6�]I6�]I6�]I6�_N7�y�E���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O                                                                                        ��J��Oh��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���M�q{A�]H6�]I6�]I6�]I6�]I6�]I6�]I6�]I6�_N7���H���O���O���O���O���O���O���O���M�km>�\F5�]I6�]I6�]I6�]I6�]I6�^L7�_O7�x�E���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���Oߍ�N!                                                                                        ��K ��OO��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���L�if<�]H6�]I6�]I6�]I6�]I6�]I6�]I6�]I6�e\:���L���O���O���O���O���O���O���O���P�r}A�\H5�]I6�]I6�]I6�]I6�]I6�ig<�`Q8�ns?���N���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��NM                                                                                            ��O;��Oۍ�O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���J�cX9�]H6�]I6�]I6�]I6�]I6�]I6�]I6�]J6�x�E���O���O���O���O���O���O���O���O���O�z�E�`Q7�]H6�]I6�]I6�]I6�]I6�]J6�]H6�aT8�}�G���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��Or                                                                                            ��N&��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���N�u�C�]I6�]I6�]I6�]I6�]I6�]I6�]I6�]I6�]J6���J���O���O���O���O���O���O���O���O���O���L�if<�]H6�]I6�]I6�]I6�]I6�]I6�]I6�]I6�ou?���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O�                                                                                            ��M��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���M�fa;�]I6�]I6�]I6�]I6�]I6�]I6�]I6�]I6�cY9���K���O���O���O���O���O���O���O���O���O���O�r~A�^L7�]I6�]I6�]I6�]I6�]I6�]I6�\H6�cX9��H���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���N�                                                                                            ��L��O{��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���K�cV9�d[:�bU8�]H6�]I6�]I6�]I6�]I6�^J6�v�C���N���O���O���O���O���O���O���O���O���O���O�x�D�`O7�]I6�]I6�]I6�]I6�]I6�]I6�]I6�\G6�sB���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O�                                                                                            ��M ��OV��O��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���N�t�B�^L7�_O7�_M7�]I6�]I6�]I6�]I6�]H6�bV9���I���O���O���O���O���O���O���O���O���O���O���O���K�f^;�]I6�]I6�]I6�]I6�]I6�]I6�]I6�\F5�px@���N���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O�                                                                                                ��P2��O΍�O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���L�cX9�]H6�]I6�]I6�]I6�]I6�]I6�]I6�\G6�hd<���K���O���O���O���O���O���O���O���O���O���O���O���O�q{@�^K6�]I6�]I6�]I6�]I6�]I6�]I6�\H6�e\:���I���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���N�                                                                                                ��M��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���J�aT8�]H6�]I6�]I6�]I6�]I6�]I6�]I6�]H6�s~A���N���O���O���O���O���O���O���O���O���O���O���O���O�y�E�^L7�]I6�]I6�]I6�]I6�]I6�]I6�]I6�\G6�t�B���N���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��Nh                                                                                                ��L ��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O�u�C�_M7�]I6�]I6�]I6�]I6�]I6�]I6�\G6�dZ:���I���O���O���O���O���O���O���O���O���O���O���O���O���O���J�dZ:�]I6�]I6�]I6�]I6�]I6�]I6�]I6�\G6�nt?���M���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��OA                                                                                                    ��PO��O��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���J�e^:�]H6�]I6�]I6�]I6�]I6�]I6�]I6�^K6�r}A���N���O���O���O���O���O���O���O���O���O���O���O���O���O���N�u�C�]J6�]I6�]I6�]I6�]I6�]I6�]I6�\H6�lo>���M���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���Oۍ�N                                                                                                    ��N��O΍�O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O�z�E�`Q8�]H6�]I6�]I6�]I6�]I6�]I6�\H6�dZ:���I���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��H�]J6�]I6�]I6�]I6�]I6�]J6�]J6�]H6�e]:���K���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���M                                                                                                    ��E��N���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O�w�D�_O7�]H6�]I6�]I6�]I6�]I6�]I6�\G6�hd<���N���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���H�]J6�]I6�]I6�]I6�]I6�bU9�e^;�]H6�^J6�v�C���N���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���Oa��N                                                                                                    ��B ��NS��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���K�hd<�\H6�]I6�]I6�]I6�]I6�]I6�]I6�\G6�if<���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���K�bU9�]I6�]I6�]I6�]I6�]J6�^K6�]I6�]I6�dY9���K���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���Oގ�P!��M                                                                                                     ��R ��P��O֍�O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���P�z�E�_M7�]H6�]I6�\G6�\G6�]H6�]I6�]I6�]H6�mo>���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���N�r~A�]H6�]I6�]I6�]I6�]I6�]I6�]I6�]I6�^K6�r|A���N���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O
��N                                                                                                     ��S ��N��N���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���P�|�F�`P7�\G6�^K7�he<�mp>�aR8�]H6�]I6�bU9��G���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���I�cX:�]H6�]I6�]I6�]I6�]I6�\G6�\G6�\G6�ga<���N���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O7�q                                                                                                             ��O��OD��O��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���M�w�D�e\:�^K6�hd<�nr>�`P7�]I6�]J6�kk=���N���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���N�r}A�]H6�]I6�]I6�]H6�`Q8�mr?�t�B�t�B�}�G���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��I                                                                                                             ��O ��O��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���M��H�w�D�f`;�]J6�]J6�^K6�]H6�]I6�^K6�t�A���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��H�cX9�]H6�]I6�]H6�bU9�r~A�x�D�z�E�~�G���K���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���Oώ�O6��W                                                                                                                     ��P��On��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O�{�E�`Q7�_O7�^K6�]I6�]I6�]H6�_O7�e\:�ig<���J���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���J�f^;�\G6�]I6�]I6�^J6�_N7�`O7�`P8�`P7�jj<���L���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���Ot��O��K                                                                                                                     ��R ��O.��Oڍ�O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O�x�D�[E5�\G6�\G6�\G6�\G6�^K6�t�B���M���N���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���K�ga;�[E5�\G6�\G6�\G6�\G6�\G6�\G6�\F5�dZ:���K���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���N��O                                                                                                                             ��N��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���H�hd<�e]:�e]:�e]:�e\:�mp>���K���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���M�s�B�gc;�f`;�e];�e]:�e]:�e]:�e]:�e\:�nr?���L���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���Oۍ�OD��N                                                                                                                                 ��N ��OF��O��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���K���I���J���J���I���L���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���M���K���K���J���J���J���J���J���J���L���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��Oo��Q                                                                                                                                        ��M��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���N��P                                                                                                                                         ��^ ��OT��O��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���P��J ��N                                                                                                                                         �8 ��N��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O�N0��M ��P                                                                                                                                                 ��L ��OV��O��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���Oʎ�O>��M��O                                                                                                                                                         ��J
��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���OÎ�O@��O                                                                                                                                                                 ��� ��O?��O��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O4�B                                                                                                                                                                     ��K ��P��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���ON���P!��U ��]                                                                                                                                                                     ��Q ��R ��O&��N΍�O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���Oό�O[��N��Q ��D                                                                                                                                                                             ��P ��J��N[��O��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��O���N)��O��L ��L                                                                                                                                                                                     ��n ��P��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���OU��P��M ��O }�^                                                                                                                                                                                             ��P ��O0��Oȍ�O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���Oˍ�Ow��M��P ��P                                                                                                                                                                                                             ��[��OV��O��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���Oی�N���N2��a ��M ��L                                                                                                                                                                                                                 ��Q ��O
��O}��O��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��O���O9��J��N ��N                                                                                                                                                                                                                             ��O ��M��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O3��N��N ��L                                                                                                                                                                                                                                         ��V ��O��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O׍�O���M+��O��M ��N ��P                                                                                                                                                                                                                                             ��E ��M��O0��Oō�O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��Oɍ�O���N+��O��J ��O ��P ��Q                                                                                                                                                                                                                                                     ��K ��K��O=��Oˍ�O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��O���Nq��M(��P ��N                                                                                                                                                                                                                                                                             ��M ��X��P@��Oˍ�O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��O���NV��N��O ��M ��M                                                                                                                                                                                                                                                                                     ��R ��V��P@��O̍�O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���Oō�Ou��O5��N��T ��N ��N                                                                                                                                                                                                                                                                                                 ��R ��T��N3��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��Oߌ�O���NI��O��O��O ��N ��H                                                                                                                                                                                                                                                                                                             ��Q ��I��N ��O���O��O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��Oٍ�O���Pf��P%��O��L��O ��O ��O                                                                                                                                                                                                                                                                                                                         ��N ��N ��P��Pi��O͍�O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��O͍�O���On��P,��P��P��P ��O ��N ��L                                                                                                                                                                                                                                                                                                                                         ��P t�D ��O0��O���Oݍ�O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��O���O���N_��O.��K��O ��P ��P                                                                                                                                                                                                                                                                                                                                                                 ��Q ��O ��O
��O@��N���O܍�O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O���O��Oō�O���Oi��OD��N#��J��N ��O ��M                                                                                                                                                                                                                                                                                                                                                                                     ��O ��O ��M��O2��Om��O���O��O���O���O���O���O���O���O���O���O���O���O���O���O���O��Oݍ�O���O���P[��O8��O$��O��[ ��O ��N ��M ��L                                                                                                                                                                                                                                                                                                                                                                                                 ��L ��M ��P ��O��P��P3��Pc��P���N���O�Oʍ�Oɍ�Oʍ�OƎ�O���N���O���No��NN��N.��O��N��P��V��N ��O ��O ��M                                                                                                                                                                                                                                                                                                                                                                                                                         ��K ��O ��O G�� ��Q��P��N��O	��O
��O
��O
��O
��O��N��N��N��L��T ��O ��N ��O ��Q ��S                                                                                                                                                                                                                                                                                                                                                                                                                                                 ��Q ��P ��P ��N ��O ��O ��O ��O ��O ��O ��N ��O ��N ��M ��M ��M                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� ��������������  �������������   �������������   �����������     �����������     ?����������     ����������     ����������      ����������      ?���������      ���������      ���������       �������        �������        �������        �������         ������         ?������         ������         ������         ������          ������          ?�����          �����          �����          �����          �����           ����           ?����           ����           ����           ����           ����            ����            ����            ���            ���            ?���            ���            ���            ���            ���            ���            ���            ���            ���            ���            ���            ���            ���            ���            ���            ���            ���            ���            ���            ���            ���            ���            ���            ���            ���            ����           ����           ����           ?����           ����           ����           �����          �����          �����          �����          �����          �����          ?�����          �����          ������         �������        �������        ?�������        �������       ��������       ��������       ��������       ���������      ���������      ���������      ?����������     �����������    �����������    �����������   ������������   ?������������� �������������� ?������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222542, 1157235318189994467, 1157235320526222540, 'index.html', '<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title><%= webpackConfig.name %></title>
  </head>
  <body>
    <noscript>
      <strong>We''re sorry but <%= webpackConfig.name %> doesn''t work properly without JavaScript enabled. Please enable it to continue.</strong>
    </noscript>
    <div id="app"></div>
    <!-- built files will be auto injected -->
  </body>
</html>
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222543, 1157235318189994467, 0, 'README-zh.md', '# vue-admin-template

> 这是一个极简的 vue admin 管理后台。它只包含了 Element UI & axios & iconfont & permission control & lint，这些搭建后台必要的东西。

[线上地址](http://panjiachen.github.io/vue-admin-template)

[国内访问](https://panjiachen.gitee.io/vue-admin-template)

目前版本为 `v4.0+` 基于 `vue-cli` 进行构建，若你想使用旧版本，可以切换分支到[tag/3.11.0](https://github.com/PanJiaChen/vue-admin-template/tree/tag/3.11.0)，它不依赖 `vue-cli`。

## Extra

如果你想要根据用户角色来动态生成侧边栏和 router，你可以使用该分支[permission-control](https://github.com/PanJiaChen/vue-admin-template/tree/permission-control)

## 相关项目

[vue-element-admin](https://github.com/PanJiaChen/vue-element-admin)

[electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin)

[vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template)

写了一个系列的教程配套文章，如何从零构建后一个完整的后台项目:

- [手摸手，带你用 vue 撸后台 系列一(基础篇)](https://juejin.im/post/59097cd7a22b9d0065fb61d2)
- [手摸手，带你用 vue 撸后台 系列二(登录权限篇)](https://juejin.im/post/591aa14f570c35006961acac)
- [手摸手，带你用 vue 撸后台 系列三 (实战篇)](https://juejin.im/post/593121aa0ce4630057f70d35)
- [手摸手，带你用 vue 撸后台 系列四(vueAdmin 一个极简的后台基础模板,专门针对本项目的文章,算作是一篇文档)](https://juejin.im/post/595b4d776fb9a06bbe7dba56)
- [手摸手，带你封装一个 vue component](https://segmentfault.com/a/1190000009090836)

## Build Setup

```bash
# 克隆项目
git clone https://github.com/PanJiaChen/vue-admin-template.git

# 进入项目目录
cd vue-admin-template

# 安装依赖
npm install

# 建议不要直接使用 cnpm 安装以来，会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题
npm install --registry=https://registry.npm.taobao.org

# 启动服务
npm run dev
```

浏览器访问 [http://localhost:9528](http://localhost:9528)

## 发布

```bash
# 构建测试环境
npm run build:stage

# 构建生产环境
npm run build:prod
```

## 其它

```bash
# 预览发布环境效果
npm run preview

# 预览发布环境效果 + 静态资源分析
npm run preview -- --report

# 代码格式检查
npm run lint

# 代码格式检查并自动修复
npm run lint -- --fix
```

更多信息请参考 [使用文档](https://panjiachen.github.io/vue-element-admin-site/zh/)

## Demo

![demo](https://github.com/PanJiaChen/PanJiaChen.github.io/blob/master/images/demo.gif)

## Browsers support

Modern browsers and Internet Explorer 10+.

| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari |
| --------- | --------- | --------- | --------- |
| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions

## License

[MIT](https://github.com/PanJiaChen/vue-admin-template/blob/master/LICENSE) license.

Copyright (c) 2017-present PanJiaChen
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222544, 1157235318189994467, 0, 'README.md', '# vue-admin-template

English | [简体中文](./README-zh.md)

> A minimal vue admin template with Element UI & axios & iconfont & permission control & lint

**Live demo:** http://panjiachen.github.io/vue-admin-template


**The current version is `v4.0+` build on `vue-cli`. If you want to use the old version , you can switch branch to [tag/3.11.0](https://github.com/PanJiaChen/vue-admin-template/tree/tag/3.11.0), it does not rely on `vue-cli`**

## Build Setup


```bash
# clone the project
git clone https://github.com/PanJiaChen/vue-admin-template.git

# enter the project directory
cd vue-admin-template

# install dependency
npm install

# develop
npm run dev
```

This will automatically open http://localhost:9528

## Build

```bash
# build for test environment
npm run build:stage

# build for production environment
npm run build:prod
```

## Advanced

```bash
# preview the release environment effect
npm run preview

# preview the release environment effect + static resource analysis
npm run preview -- --report

# code format check
npm run lint

# code format check and auto fix
npm run lint -- --fix
```

Refer to [Documentation](https://panjiachen.github.io/vue-element-admin-site/guide/essentials/deploy.html) for more information

## Demo

![demo](https://github.com/PanJiaChen/PanJiaChen.github.io/blob/master/images/demo.gif)

## Extra

If you want router permission && generate menu by user roles , you can use this branch [permission-control](https://github.com/PanJiaChen/vue-admin-template/tree/permission-control)

For `typescript` version, you can use [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (Credits: [@Armour](https://github.com/Armour))

## Related Project

[vue-element-admin](https://github.com/PanJiaChen/vue-element-admin)

[electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin)

[vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template)

## Browsers support

Modern browsers and Internet Explorer 10+.

| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari |
| --------- | --------- | --------- | --------- |
| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions

## License

[MIT](https://github.com/PanJiaChen/vue-admin-template/blob/master/LICENSE) license.

Copyright (c) 2017-present PanJiaChen
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222545, 1157235318189994467, 0, 'src', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222546, 1157235318189994467, 1157235320526222545, 'api', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222547, 1157235318189994467, 1157235320526222546, 'table.js', 'import request from ''@/utils/request''

export function getList(params) {
  return request({
    url: ''/table/list'',
    method: ''get'',
    params
  })
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222548, 1157235318189994467, 1157235320526222546, 'user.js', 'import request from ''@/utils/request''

export function login(data) {
  return request({
    url: ''/user/login'',
    method: ''post'',
    data
  })
}

export function getInfo(token) {
  return request({
    url: ''/user/info'',
    method: ''get'',
    params: { token }
  })
}

export function logout() {
  return request({
    url: ''/user/logout'',
    method: ''post''
  })
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222549, 1157235318189994467, 1157235320526222545, 'App.vue', '<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script>
export default {
  name: ''App''
}
</script>
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222550, 1157235318189994467, 1157235320526222545, 'assets', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222551, 1157235318189994467, 1157235320526222550, '404_images', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222552, 1157235318189994467, 1157235320526222551, '404.png', '�PNG

   IHDR  �  ,   X�2�   sRGB ���  @ IDATx�y�$�}����\j����7z��n@�&��� 	!$K�GO�,�:6�Y�m�����=��,�wfޙwf�yx����K�bB �FB ľ6���^{Un����Z2�2#��˹Tfd,���љ�M��H�H�H�H�H�H�H ���JN�I�� ��~�Fϒ�=�<��ְBQ    �*��l��E���^�uT���ɽ�;�Λ�,y_*�H������u=��H�H�H�H�H�<*���� �Y���w���]�ɗї��x�ۣ������%�C���ߓ 	� 	� 	� 	� 	�N��}�yh{�������D��%?���JL��|e��j����$@$@$@$@$@�	P�/ͅ[I �<ϋ}��)(��A����@,9�/��@��O����i����<	� 	� 	� 	� 	D� �M6�J���~�7''��w����S�>�dq��e����s��FM���$@$@$@$@$1T�#6�.	�#�͟y�<G��:�J��r�5a�A\Ï�_�%O|a�5ބk�$@$@$@$@$ZT�C;u��G���ڶ|}I��:��;o�g�T����������o��V����$@$@$@$@$�n�طیr<$���޷��z_�CS�%K�D��ˢ�Hi�i���ֿ@�~Y#O޿Κ4F6
B$@$@$@$@-"@žE�yY0��t�~�\1��C�W%��S$���4dy"X���w���A�Q    h��n�6f^�H�B.�a�.�"�	K�B�WE��|(խl�Bn���xx��Sޛ^��1�[.?��FK6    h{�},o{� 	��@9��|�۱sJ~/T�A.��b�Dl�#�rz��^��|c�g$@$@$@$@$f�؇y�(;	����zr��[�oQ
�|X����w&Z(.~''�w���k�~�5l�>�O,����jeZ+!�N$@$@$@$@�#@�}�X�L$ZA,��6�|(U�+��P�a�7�!|`
�CP�R)y��ˬ��GAH�H�H�H�H  ��H�CH��B�ފ�t�,h�}P�5��Z�K�_y��I?\��v�S�ﴲ���k    0� {�g��@4R��-���������>����8M�!��O�䑻���؁oH�H�H�H�H�@T���D�&�L�~��lX�Պ�]]�f��Ӭ����� ��w���/�r���k    0� {f�2�@�	�J��9l�W�5��*��N�7S6�ݨ*�ڽNy��K�wK��M$@$@$@$@$�tT웎�$������	��NY��e�6���J�/�g�~�5��r��-+?s|G$@$@$@$@�!@ž9�y0�����t`ZNo�%_c�S���C�a���K\�o���t���H�H�H�H�I��}#���$�+��1v�����/Bl��_d?C|�@̓��W�3�[�3{|O$@$@$@$@�"`��p���� 	TJ l���q�1(��e}1��a.��u�?f�@GJ��=։���5	� 	� 	� 	� 	�J��}�y<	��0+�3�[��W���w%f~��w��{����1���s��ܲ,��r��$@$@$@$@�&@�>��G�I�.�G���#���.dه5_����ϒӐ�_{7b�QN����	� 	� 	� 	� 	,L����	�=�vU�O\1���k9=���Ǘ򀕐�{�''��5��5	� 	� 	� 	�@9T�ˑ�v��((����c*�Z�{`͇qߨqNz�|ς�~ғ��}���}6    �C��G�9�q	�@DQ����F�Z�5���y��4�''�~l������k�>	� 	� 	� 	� 	�X%��B$�lQW�g��IN�Ӄ�ߝ��i��c�8���A���.y��v[�y��H�H�H�H �h����s�$0� ��4f���G)�%_��+��/q�����^녙#�;    �v''@ž�g��#�
P�� v�����k�=U�;��̽ �{��w�5�m�cȴ?����Z$@$@$@$@�''@ž��yE0� �`S��a�W%]��P�Mky��$�������+��L�� 	� 	� 	� 	�N�������3� 	TI��}��J���''ߛ��''MK����.��.���/Z"?��E�h��p	� 	� 	� 	�@�P�لQ\h*����	�T�W��.$�3��
~N<�!��''��+{�W�O�g$   hӞ5�1f^�H`*������&�S_��	���Zr?߁��y����X�1�t$@$@$@$@"@žA`yZ*�͜-KÒ_t��40���qxT��x0p�����$�k� 	� 	� 	� 	TG��}u��7	�%*������|pُVNO��m���?�]	�!2�O���L$@$@$@$0� ��D��"H���������|X�ժ�2К��,��A�ۖ�}{��̠G)H�H�H�H ���Gw�9r8K���YF���u�Gl~w��rzj����|w�<q�:k�(��H�H�H�"@��}&�C$��P�_�P�??���~/z�@�}PJC��>��''`��ʕց֓�$@$@$@$��t�l�!	� 	TK �zrr\�n�~Q�`��L�%���<�����''��~�?6?.�}��G_�h��7�''   X� -�3�$��h��k����P�θ�&=K)��߳�:d���H�H�H�BJ���N�& �"����qT���漸h͇�~Ґoy�;a���[�o����|{��x�V+S�� 	� 	� 	� 	TG�@�Nu��$@��žv����3n��.��C��A9=���5Kd �@��O���/��''$%"   s	���g.-JFmJ��}�N�a��ꧻ�''�Y;�?L/��?`����ny���V��(	� 	� 	� 	I�����B�H����7��	W�|=p�WE_��](�gbÏ�D}} e��w]a6QN�D$@$@$@�$`H�e+��$@$=��Gծ]��MO�����ψ�}D��vM��L��C�~$��e���Z9#�$@$@$@$�B�<��� /M$ ���&�N@���a��5	��]Fd���b�͏#6�+�YG����I�H�H�H *��Ge�9N�� �y��#��|겏��|S8 ׳^L n������<��H�H�H��@���(��I�T썙
�)&�Ӹ��P�13E�5�=�.����cfJJ�H�H�H�H�v�:X�>0��H�H���?5!~W۽Z�U��$|&%���}���Ϳ3c������}�f�_w���v�r�O�g$   ���ž5�yU0� -�FMGh�I�PN���߫	���� ~��rz)y�w�X''B��� 	� 	� 	� P��m@$��y��N@���%]c�;���>���S�@��r��eYn݁��$@$@$@$�@T���&����>,3^9SS	�T��5�}#����_�.[A9�SF
J�H�H�H�H`C��Iȗ$@''@ž�y�ibК5&_�|-����}h�KK\�H>�~�Eߕ�,��j�g#   �P�7j:(	�� ��p�U��%=ɂ��*��xmj��I��/6z�<z�N댩�R.   �h�b���hI�$*�%�pc$`Wk�_N�>ޚ�`͇`?Q�}��{/��i�7s�(	� 	� 	D����LQ`�1��1���g*��~��a�g��,�Ӭ������g���1��C!�Iɣ�]j��<	� 	� 	� 	�#@žn''��b|�5	�Uk<�~�ȶ兯Է�x򳣞��`LƳ���#g�����Y����i#�r<K~\�Ϳ�*�F
J�H�H�H�چ���Em×!�P�b_�4�{�5�<����P�e��]ϓ�c��p�߉��Ȯ�<{���5��/���4������[�{VL��my����?"   ��	P�� ��#@�~�9����Cx���"[�Y��^���D֓�θ������%g��r��t''�?��w�}��٩�:u�+E�I8����Ku8''OA$@$@$q?�D|f8|h"*��a�2�(��lZbI<�2_����v=96��/����i�-����	�G��~њocMmP����{��X�''�}�"k�TY)	� 	� 	����؛;7���F���9�)�T�~�+׮�d�*�D߄6�q�Ӟ<5�Ǉ,�3_]�k�E�|P�;�v���e�	�C�c��]m�R<		� 	� 	�@�h�k�c� I ���ث�w���C�����I�|��&k��O�{O��/�''�WK ����T�O��������a��?�#�ߵ��� ~H$@$@$YT�#;�8	�#Ež��n����kE�.n�2n6f��`�I{��)�y}�g2
�N���߇���zk�,���qu�O!6��+�׍���� 	� 	� 	4� ��#�I�<QR�o���G6Y��ג����2�I����''�?��#/#�ɛ�	�4>_~��� �;X��.�����qdڟ0VX
F$@$@$�pG6|� 	�@�l_.�+;b�"�i��lߕ������w���7��C�8[���j�xV�Ȉ��겯}-�7̚G���P���I恧�h9=/.���z�nPx"   �P�b�i��$@� ���Չ=K����e$��9�	�;���5��q�Zϡn��F�����L��4k�a�kՂS�m�]��-�r�+�P�MK������<W>&X���S�[��)��jy��u֤ax)	� 	� 	�@�	P��3P��H�LW"�~E�\�u������<�Cv�̠��%����&�<V!�9���K#e��ahp�>g�t�.�''����!�ş*�k~/T��B�Q6chn�}��|`�������_��:`���H�H�H�.���#OB$`2�G���$����,��ӓT|G�.zW�u	�Ʊ�����sc8>��͋���9*�y���|��ǰ�
�ﲏ�)æ��N�ğ��O �@�俁���-=�x�<�ōV�9�x   �F0���C�I��J�-��B1�����_Ơ9n�e�#�-�՞/��''G������mn~R��"�gk��A8�kצ9�rzP�{�����p�?�݊?�am���2�����E���5�,&�   ���b�)��$@�PW�C����žಟ��=���S��N,��e_c��dhB�J7���XZ$�&r�L ���i	��rz�"�ՠ�wA�Ob�������겏ň�5=��wZ���H�H�H �؇`�("	�@p��Q��~��G]���Iu�]d.�Ǡ)A{�k&�Z:�ʁSHu�X����dĳ�XX0Lk\H�|>=�~�g*�*�]0��<ف;n���q(���@�ǃ��''/"  8K���Y|A$�n�/�I��
	��~K>4}��,����~5mp�grX(��(͔_p��� �����l>H�e�B��C��^��q-��c�Do�O�_��.<�i�E��WE�?��^[�H�H�H�L!@�ޔ��$@u''�	��R��fIlJK� �ݤ���묊�&��dk��*�KjlZ��R;���99�b9�l��%�&$BD>��ӮC�a�W%_�𙖀oj�v��.(�8��Q$�{����<��*��g#  h)*�-�ϋ� 	4����"ۖ�V�u�R�-&��''#�˾#q(r��ʾ�,\�5����-�|��f�/�p�<�	tQg�鵿��uj>(�����|qD��>�f{(���π*��^!O}زJg{�Nl$@$@$@�!@ž1\yV ���v[oZ+��۾˾&XsQ�N����om�z��w�H���6�j��1���診�[K>�U���B�F��%ڃ���{ZF����Idڿ�:j���H�H�ڔ �6�X��LࣛD�w��Z���b1$�sjV��q�H/�;�ů�"���u�5���k`�"uٟ�曘�������{�lƏ�N���VX�W��nY�ǚ�})?	� 	� 	4� ��� �� hU|n�ڼ�v%''���)Զoa�|�7l.�<8,��{����l�8���0�j(���kl�Z�mp7�]�����鑧eH����a��w]a3P^�D$@$@�$@�>��F�I������7�Z_N�Z�{j۫K~j�kʀ�7� �NyL���b��Ƒ�5(�s8f���;C����k�H��]�Djv����a�;n�>��pٿ#�"���9,��ֿ�J�����I�H�H 8���G� 	D��Z8`}����%_3�[Vs�cP�?tAA�_�]zQE�lY*~����Lz��|��x	�]Ӎ�����]�h��[�|O����RzVj�dMC�W��N���/gx�{гPN�S��=�
6   �J	P����#0�@k���Z��K��llm{�̮�B�r_�S���ᮯ=��/������e��j�&�|�O���?.}��''���S�`�ǲ���''~mr�����Y�����^yC5���J�L$@$@�#PݓX�G�I�*!p������W*���}.]%�{���+m��cȊ_M;=���L�s�����d�X�d5��x߫�����e�.�`q.Z�߆�>[=	X~	=���~wcn�z
���p�=���.[��^�T}/��� 	� 	�@�	�b�9�H �4��6�۵zb�j�.��S���.(���w��T�MK���	0�}������?U�מ�e��G4�Z��������k�,�E��X����Q��4�@���}Wʳ�g�1	� 	� 	D���?�ў��Z@ �����}ێp~�5�b��R,�D����w@�޼�u��e_��	��L�<,�`?��~*''����R��^y���֙�LI�H�H��h��;R��H��ԕ8���b��pǇ�=H�y�ȝHv�my����I��/;_����x`�5_3��F�O������q��b>��k>M�h`[s��#��[#� 6� 6?�����_Кo��Q$  ��0�g�!C�II������5#{x��m��9����N��}.�ۖ�B�~׊p�J{~�}��k"�����h{�������M�7g`���;��/)y��K-Y��H�H�څ -��2�	D��j�� ��rȞ��ֶ�V�@��v��_�*
}q8}�\�Q����}�}��k��SŽ�7(��P�NN�ӛJ�g����*X��J���ޏ!���U�/���q$@$@$`"*�&�
e"�� ��U����Cm{�����?�E�Y2�D�q�
�f�j�/4�\�/�˾vm�ι쿉l(zl5�z2�$|��/}Ͱ��zᲯ��isnc�?���3�_�)��Qp�<��*8� 	� 	�@�	P���Qt�2��+Ev�g����i��U��$\�{�O�E>���>_�O@24�z�1]���|f;����ܱB9=u�O��=�V@ �zr^ڵ��"�(&���ڡ��ּ�;�o��=�#������o#6��˭k>;O@$@$@M&@ž��y9 ��	�r����''jg��<\���yU�T��k���11(���U�D��B�Z���6��U!}I���]_c�U1e����f���©RXZ��''��C��`ѿ��ס�������c_����
�&  ���b�xƼ	�@�	\�QdU�{��	x�$\��~B���.��v�Vk�*������͈���A?�y)��B�g��q�.�A���d���ؘ����O��E?9T��S5�=������h������>`y����+M�"  �*P��w%h=-o��[/GX%�`�v�i�����5?�}�\��~�%��|�"�8�e_-����u�.�5�-X�s6�j�b�}�wm��D�`����Gp�����b�=U����/��k�� 	� 	�@P��D��H�y>�M�+a�
�<�^Ƀ;������@��?�e_������k������,���RDW���O2�5�U��LG1߻H[��Ÿ|-�gj�n��������,2��0�m[��z�.`x  @��} h<�H�5V!�ۇ.h͵��.\�m[�H]X��r#q�Y�}�m?�.���Q�o\�L�#Ȳ_����e_��V]<9��zOj<�f�We��~�O�	9�hO�g 7hw��M(��ڏ����_�k1k�lf|O$@$�0T���''&�7-o�q�l��,��P�>ͩ�M��E�}-����g���}?lmm�%k{E>��1�}{
��_�e�c���''�H����%q�,�m�n�ZNO8�<����>��4��ǭ?`%����Yo)3�" hT��f*9ho�V�\�"�Z�����܅k��{��iX��]H�K�����q�� ���X�_9UȰ��|M�V;��|ZNϏˇ��.�)s�b:�������o!�[�{�rzKΓǿ���"l$@$@$P7��$�m�<	�@�	����v�Eh�%߲�����B�T7�,��iWg���|Xeu���l�P�.�GG=ј|��
�_��V-�78)~�3i��bl~��2�m���đ}��d%�~ Q��྽�[��L�H�H�BD��}�&���@T	\�Ad�"s���</.���Bm�8|�[��|P����T�/���e_��[����e_]�56_���e�0�5�"���G�%������o��w:œ���f������6��~l�<�o���$�H�H�H�*T��ŝI��M@g��]c�{��5C�eV�r�e?�k�z��S.�a[�Q�������kH�W��m��F����YH����5��MmX��%K@r�{Z&��}U��~ྫ�wL��r� 	� 	�E���Y�AiH�fP��*El�#���n~����ohSk��}U����0���8OD�����}��Wk����e���ЃI|%��J�W̲�����3�ϻ0�O�v��R�5�����������;�^�F$@$@%P�/��H�� �z�u̐�ݥp��ګ�����̀*�y횀M�����)�������|��߲H�5�~�e_���?F5�.�	�����v������ Ӿ*�?	�^� ����##2E_���1��߳�:T8<		� 	�@[0��-�r$@5�c''<�ΆU�Ќ<��M����B�<$P�O2�Ur���嫒�~�FRH��u"�]hu�i��)k��tٯ˿�:����:��O�|�蛜�kY=pD��~Jc�i�E���''�Y���Z��P�R��H�"I��}$���&�	l_.�{e��2��+���X풜w7�?Tk~���[�&�S_-���_�㩖��p����ݰ6��s��$��a�l�����$TbM���~\�Z�a��p��.��p��XNFa�D}/%�_b�k���H�H���7 *OI$PU���U�9xt0��p+��G�J~�e_��z_�|S3�O���=�ܼ����e�y��5�9t�%g��������]�uc����O_�A��h����K�ڏ0��=��O>l�2	� 	�@;�b�γ˱�@H	\���kX�n�٣''�<p�~�I�PoT�e�w�/��Q��~5����k�Ȳ_t�?�3[�4��8�~d*�_Joʚ��Mm�%��!�G��٧eX��x�o!6������H�H�ڍ �v�Q��BN��J���A4\|�`׊��Y�}u�V%�XNO�����eBW����"''�᲏�{���~1�`��d�������iWk�&�+*�&''����b��m�u��?�[| J~�����v�B�
	� 	�@�	P��R~h3�|Q*d�U��A�� ��v�E�w�WE��^�x����p�מF,B�e�Y(�#�a��fj�?��oh*�*���/J���R(��zy����e����56?�Ƀ�^e�O@$@$�T�[��%(E�<Tp�ȦR�p	4���f]]��Z��-_Gܒ+׊��e��3"��k9�Cp/g���	�P�����h�WO���Q܁[��J��������W�Ӗe�r	� 	�@P��$QD�
�ϱ�]T�:4�T�}���
�J~1.?�.�.���"��jN��E<�A�����|
W��i)=-�gr>��z''�O;�����r��CxߟH�C�.���F$@$`**����"�����KWQÈش�n�E��\�՚_��We?,w�x֓wNe�������q��d���AR�L��,��ot>�����*��j>+�Oy?�:���^y����2<-	� 	$@�> 8F$P?��k=	���Z��]��˾*�Sq����u��p^<Kn>#V��"�q��`
?��{�5_�Z�b�MN�7eͿ��@l��=�B��1�8$<t���2�� 	� 	�� �[I��&�	hy�u�a�wr�H`.Փ���lz�/X�\����-H�.�N�dx+�����X��=��B�з��o8-~$�K!�R��kl�&�3uqȇ��r�R��>�������������w���>f# h&*�ͤ�k� 	�!�V�O]4g37,@�6���#𱋔c����~\�*���7[}��n��I�L�;Vdʽ�@�J���`e�=$�Ӯ%���Ԣ�� �6O�P_��E��=�_N|�|����ny��v[���N�H�H��P�o���PH �nFI�^���x�Ԫ�J&𠏠]�PPk~�r�b�5�*�������㎼;�͈?_sݼXNV,��l-''��ufR��KA�	��c�E���h֊� �_H����������e�������^�H�M	P�oӉ�H ����Ma��md�JB��C;d%��.�����b\�Z��ՠX����B����N��s�G�J�5g?$��!�AO`e�����O����xp���5�{֎�
����?�.���<rߥ��H�H��A������s� 	"p��m�$�y%�qI����v�6�E;I�
�f؟����ಟ�K��ާs���颃�O����T!h�w�!a��	$�CW�EZNo*6��}��''�p�}.�_tӒ�����c�z���ѲS8 0� {�''��@�؊Z��;�J�B����DBl�� ۅF��+!��u�eZ-�V,�������	׷Ի�b�y��+��84E6�	hu��
i?i5��䫢���~���Z�w-����S�Q�;�ޏ���}WY(�F$@$P)*����~$@u%��v���A]��=�-zܵ,���R����?���(2܏���e�a	L�#P샩����N�P��l�"�	�����mh�~9=��C�O��ķ�z��c�0���֋�	JK$@�''`��|���$@&p�:��mJj0�O��L�W49-+;�>_S&�e�f����}!1Y��`[P�s�/��ɥ%��x z��cd�v��A$�Ӯ�;Yȴ���n�٘���5��:��&��7�{�!�*��y����/�H�H���b?�_� 	4�@
z§/j�eB}U�㈩g#�R��ѷ���G����x*�[���ֳ9�I���7ܟ��cn�s�g��+C���=M��	��u_�>�n�����;P�''=*YX�y��-9 ������ 	�@���U�$�	�@�hy���mE�"1�:�?ut$���E�-�$�''�D���?�o� S>[����Ԅ''o��䙣"/�9
���^d��=IB����N�9/}���n����H��C�&��p�UH�@`�0߰�(J�!�T��k�k6��@�lu��z�,׽y���P�Ί��n��C��	�''�;�rz�|j��|����v�tV�=8&��Xj�|��H��M��}���z$a�m/��FAɡ3��$n,C@��j���3k�̈́_�2g7��I�a1�bǳL����|��ا.�Sn�J���Y/��׎M%h�@�>	� 	B���!A1H��	l�Me�jCM?-���ZΎ��!��A�{?�~5''�p_�<����{*<�����M�7(ҕ��?�ߣ	�����kY?;0*�iI6  ����O���$@#p�Ά�:�''.Xg��TI�f:a�2�^�(������"�>f�t�Y9Ϗ��x|>�j���{��Lꇺ�ϸ���2�R�l$@$@s	P��˄[H��L�j����G%�.XaA�泒uf�W���<Ih$�8�i�U������β4޾�n�$r�O���K��ƕ/�ppÝ��k�E����]x]�vr4/����JI�SP��H�ZH��~�[��&(M@Ka�ʶҟqku�-6��"Sy�5�����- ��T.�S���/߄V���}��&����<ٳ��ũb�n��5�$�''�y���c��&@m�Kx2
�x�5�]p�WK��ի%�[''2���q,\5�o��� H�"I��}$���&�����jv�Z_+q�u$���|���d��@��̔b߈���H��*�v\�ۗ���m�_+r�NOV�FfK�9/zR��Z)~O�\9>&��!��nչ��쫷�������B���E��|�]��C�r�$K.�ϝ��� 	4� �F��I ��A�F����.����1��f�mv���3S�E#��gc������a�ASE�K�zr���dW�"ё��K��w��Dr�<̓|9&Ù� ��>�\� _''��J>nu�/��O3�?��S�9F@H�H �؇c�(%	���g/I�%�-(��Cq��*k�l<��hf�bkvt�� �ޯoo�cĮ�D��Ǔ��-�#l���w�y��^H�o��yړ�=��^�ɫ�k={t��D�I��g�����|�XG��IG�zsT&23�9F�GJ$@����l<<�H�a�n�&�<��]֝��>A܊���,��T�i���m��b_�>��O=P.����oIc���ݞ\��`��[�M��#��2(����̺��''�?`�������~>�w8��قߓ7��|�3A�@��H���b?_� 	ԏ�;�\fY�''rp]�$?ep�xM���dK��Z�\R�JK�E�~wk8Ϥ.�g�)Śm���i�����w��H|�[���ii�g�l�:��e���7��jܕg����+1�dME���N�����pq'' �C���$�@$P+�+ֈl^j�R�E�������拧�L�d��j�G��xu��%�VX액��^�2�o���^��G7�,�R���Є�r��	���k�''{En��C�u�w���-9���l$@$@$�T�A��$�P��n7��qӕ������&a�7�¼���Dꎟ��foUs�(�Z߾9��yp���\ٶ�Mngr����WC��z2�Rz��=y�MK�z׬�O�9R6  ��	P�_�� ���M[`=3��]�kj�xz-e甩Y�Hؒ�;`*�ȥ���{���uP��x��*������6J�Ŧ�Ϸz�__K�u#��
���!���1W�:b����՚p����$@$@��bo�Q<��(_�1(���3��7���5�ɔ��������c	5��*O@-­��%�(����D����0�lKA��!����.�y~	�T��
�q��ʼ��F����C)��N���K��B296  �� �jhq_ �y	|��R���G�$M�gl�VVJ1S�g*�D�ٮ����:~"���mX��z������&4��#�>�{���>�I/U���%�)e^��1(��!u�В�Éc�fy�%�(���b<�XLNk�w6  �� �
 q ��	\ ����-�_s�����s�h���D1�E%f�>�%�dͅ`Yy���nmK���U��<M�hJs�Ȓ����.�ׅH��7�''�JNS���$��]0���rh����s��K�1gab܃H�H@	P��}@$P&��M;~i���I''Q%6����զ94���T^��-�%����RQee⸝܄�I�������m"Ɋ���Y�lڙ)w��(����rd0�{������0��D$@$� ���x$	�����E�.3Ku����Z�����Ier.�)4�:/q(w���wB�OjFt��,J����z��ۧŎw�e�Kp��79U%� �e���+U�ό;3�!o��2~ͪ80��|C$@$*T�C5]��#�����a�\#�̛''W9��������`��@��	�]�5�:����6���B<�|W-�ɉ�|+V�+�gP>Sc�kkӔ|,��ė��.��,BP�ʊ���n����"����/��$@$@m@��}L"�@�$pJO-7�����I��֟�5�O������^9��IG�;%��_�ˍ�=�yV�U�jU+��{�''���6]j��_}��;�SI)�S� �|�h������3Z�<ǂ�*���8P����H�H ,�؇e�(''	H�7%r���E:_(��ҫ>[m`ȗ�7]�t�ZO�� �I��+��jmG���%�b��9#nߩ���.�$Z��+��#��l��x�|,��F$@$@%P�/��H�*#�+p���F]���+�zڣ���E��SGD�k۶̓�oE����M�4VQ�+�x.J:��U#�p���͝�f(�����霌��1ӗ��9��z����M$@$yT�# 	#�~��5ƕ��[-ʥ��X<����k�E�k;�ݷl�d�
�n?����cA�h�_k�[~�}u���������߉��N�`�&Q�����d�ŤʦG��qT�M�ũ*�qw h��ʶ?��H�B�p��P���e�Wi;{0_D��{�"�ǳ���&J%���E4�:�������''��_�R|���K�Yt)*��4��|��Љ�{]U(����� �
V�ӟ�?�![,''xv3_� 	� 	� ��� ���*B�+o��8��l$P)�����x�е�Í�
��V2�^�+�ORU�m(�5M��+-�W�>לqxë#�&��d��)�Z��]��;=��]�x����o�Շ7�&�# 0� -���%$��t�����9G�~�s�pQ������#��vm�_�ɇ7�h�I���I�M��]������]��ẕ��7pߒ?K��%�{ʒ����9���lf����ۗ`�M$@$UT�:�7	$��M"�u��Ѝ����QV��O�h׶�<On�\H����貯�5��nYZ��9�$x*�uۜ͡�PT�U���$�v��_�.��ԝ��!�>�x��y	� 	�*��6�	4��"-o���5���hAj6h ��O�h׶�W�[
����|� ���;�	��K~�x������L[8�r��=n[(�i�[�����<�C�P77��.��	ߑ 	� 	D� �(�:�L	|q��ڬk=2᳑@3�;"򟧒�-օ��|o�H��lڿ�f	p������x�^�T���	�.���iԷg�}�Ը''	� 	�''D˲� 	�����Ry����k�#�Y�u��H���3"����<"���;z��W���>
u��0n�p��f��x{O|6  �H�b����I�rZS�2�v�f���m��=I�o�
��������K�/ .���HB$@$�.�ط�Lr$�@���x�r�܌�''�(5�����$@%�:�PH=�҆��5�FxC,�H�H�"K��}d��''�� �����ߏL�}���{� 	�F���ܺEY�|�i��O�o�"w	� 	�@4	P���s�$P1��lY�m��~	�Z_�4rG0���4��y�1��G0���#?7���H�H��әt  @ IDAT]	P�oי�H���(�e`y;�=�n���l$@�''�����X�=��	.���ꉔ�" �P�b�i��$��F�ꮄy��Z�۝�4oL��a^�ZK���,�V�(Է��iy>  �	P�7|�(	����E"��UW/�LΕ�L��y�D�$���		4��.H���v����x��x�t��ђ 	�@�	P�����@9���]��,�[_K{�H���� �$Pq<}|f��u@Y�Z��uo_?  �6#@ž�&��!�z�x�����sW��:2	�}�v����B��#�z�qkR�w��^<˝�ͣ����,w^n'' 0� U͛JD-%�>��z�''��������+%�����-�SQv���dU�g# hwT��}�9>����7���1�Z?�v%�����HL��W^��w''������I��b���9a!ޞ�����f h�em���@H�vjI���Mk��yp��X��dI-���D���NKn�>[s	��}sy�j$@$�
T�[A��$C	�Roby��	G�����''crl�</Co�E#�ً;$i��b� �sb�o/���AďH�H ��؇z�(<	ԏ���o����u&��dh2x&|���0\�H�ZJ`��h�;��P�''''��탇4�Fr^�H�H�T�+��}H L-o7���nF���e4�	�I�pw�Zob	Mñ�U<{ַ�+R��H��!@�ޘ�� $�:{�Ⱥ�W���w<�a�?9�����Y�2	\�ܖKV�Zo��P���j�	sAH�H����[O�<	����y����Dч`��''~��đ�d���.$�I��=37�]K	8���''m��H�H�-�b���A�@p#��,~���s\M��OMZ�|hm���$P9����e�2�*''֜=��NkX9m���
	� 	�@���W���@;�C]�(���c;3<a���Cqq��j��R��!��]�֛8�x{ַ7qn(	� 	!@�>5CmB ���w�i�I�\��Ϙwp$&o��ʹy�<�#pݦ���K�Sg�ss�:Sţ\$@$@U��o��+	��ᴷ���1�#�]��F�G��7 >Fu#��>������''j/�Fy��aO���g% �� �j�qh��J��T�gI��пp2&������>�GB���E)���cFe���լo1��u�o?w��H��E����/JKu!06�}J��u9Y]O���x���<�Pxظ�����H zS�ܼ��� s�
}2�U��{D�$z.�鱑 	� 	��@�~5�ˈ��@[��vyK0qP�?���A��Gmey��x	ԍ��w��#�,�s��n��b�%�TR��4����a�g�}�o
@$@	05 8Fa%0��/!�n��W��֭�4,����JʏǑ@���ɇ7''�u�ȜǶc�L&�ЫJ�I�ax�bLx��%h�ط�Tr $�0(Ͻ�''����cdґ|�O���A���xE0���.N��3[e���ާ�I_��E�t&''�ƃW���s�b��\&�B$@a!@�VXf�r�@�Z�op�u8U]O��|-��S�<���N
OFlXb˕��Rt�z�V�X�`gq��>��	t��5]X�x�X��e2��$@$@��b_=3A�$0��6�2tO��rS��}��ءxM��0$�A���xOk�(e��v�������T�:A6k���|���d# *�a�%�H�!�0���G�<u�����!F���H�^v��ˎ�|�X��.{$�z�	򴩅<�͊z.��\''#1K��9�&�e! �r�4\���@�yB.�Ϙ8��	��L�{� :��a$PW��������N6=��q��g�S�U6(����ga# h*��"��@��ó�7[t�y/�ͻ2�� ꅓ�G|=	�@k	\sAB��1��|�������T<=���r�Է6�~>y�3���=u��P�s h9��Z>�K`4-_�.m�U����x��v9���0���Q$P?q�>������v�w=�O����)K�o/����9����I�H��؛0��D ��E0��U�N_�i''�$j2�Z��{��fk�� 	ԁ�[������P�t�O�O�
���[�kS���T�g# 0��9��"�`$^(ow5�U&��k�xNd�QZ�M�W�-]�l���h��іr������X��:(���:|EA��H�H�$>��$@�$0�A��\��M}�}m0.����94��"E���ғ���ܤ[(�纮dO�-��~f��rgl�v����Q߾��B��$@$@eP�/��I�E�� ��Tܒe=�,�e�:K�ؕ�=y�ȏ�d�n���0��JX�iɍp�g+O �̥9U��Y�������ʟ����.VT�o�LP �K���\&�B$�@�iG�v}%���N(�P�{R3��]��Z)~��ONM���I�y�DL4�	�@�h¼�m��x����Yd�����}2��ʔ?ߞ�|���Z۞��͙JB$@J��=� ��pa�� ~g�`�_�[Xq�a�P�W�C�ڍ"ih���c���%�G�[�ZB�X�B$fk��`�������Vp��KW_�H�H�� @�ވi�$#�8e,�j�[��<�Z�ki��l^�]��힌�]90��KX�q�l$@�	�~q�����zJ-,���F����-�ۗC��$@$�tT웎�$�hК�Ós�%u�`��K_g��W�⯖�%]"��)X�ǳj�����9�u�\�ܖKW�Zd���z_n���/G��I�H�5�ط�;�J�#08�?���\-���S��7��5_�zf�o&u^��ܹ����Ӵ������B���x{.��c��$@$�,T�E��!�ȡ��Ȥ#�:b�2��y�fF����CK`�ڸlY�G�j&�\�����D	<(�Vsi瓉�� 	�@	��9���1G� (-r�e���ɚc�#3q(	H@#e>�L�l�h''��r��p��&�N��}9F�N$@� @ž�yh�oԢKϸlw*.Y�؏���l�D��w%-Z�gP�0��u��r~�m���I��H�;/H>O2y#��+"�y����xgE�s''  ���b_�<#	�@	�p��p�y���;p�OBO聋~���J��M$@��O�H82ڇQ�]ϕl6''�''£��,�N��pɷ�ўt��H�ZD��}���$uq����o4�I�qD�v_k������I��n�(�W���yy��|�R.����|Z�-o
_� 	�@�P�oh^�H�<�CMMi�ǗS�xp�O"�rj�k�:6 ��X�����������f./�����4���$���T�=�����'' ������7$@&H����!̈Z�񰫛4.�����L�AH���_�b��Զm�l�s������bf;4�NnR�DW;�c  ���b����$M�5���e$�˸{���iQ*&1Z�ycp�M!��''&�lj̴''�OgŶ-��wA���ݓ��}J=��h�XL�v�rdd��м�\��E�}��{''4()(	� 	TL��}Ũ�#	�@�	X��J����=�c��w�]�#�:�	(%l$`*��.N��rd�)d�G6�	,������(.��B�hM>��K���}"�3;��v�W�}<��`�����)	�@���_��pH��F@�sv�`���P�i�壜��Ԃ��~�{�g(��mX���!х�ͅb|z,?G29:Lo��>�Q+�L3�~]�I��Je�4''�x�Ԣ6�A$@f�bo��P: ��	�+�����(�Gme_,�W��#	D����&���cCy����a�WK=�g4u�O![�����/��C������� ŏI�H�vT�kg�3� 	H ��T�	X�`ͷ�4�M����TXDI�"H��Uqٹ��GI���妮�D� ���]�(�ޛ��R���"�^�<XY�V�<�H��#�>�^󍒟�@D	@u������_
��I��s��hI��7M''��''죠���cw���ɩѹ���i��t&;G���Ŏd������_���<��H�H�G����ƍ�g&�H���,��H����!Z� l=/.��z�ʑ��;�G�lG����3$��v<~Ds	����B��vKoͥ��ޣ>��֮����Y|�?D���o����x��H�L$@���Y�L$@$P�@��W�8�g�O�ھ�\�^d����yl$/�@�q��%��J��7��a�&U=An�e�����\%�~�����%��vw�/GQ��Ȕ�x�r���H�j#@ž6~<�H�N@]v�"�ٲ�җ��[R)ٲ<%�lD��+���d(''o����aX��3�҉Jv���+�t1�l��o?�5)˻��9�qd2k��I����~�z����og��B��9	� 	TK��}�ĸ?	� 	4�@J��׿�4ͪ������U�G���cp���ۧs��iǷ���l��JR2�ۆ�x�Z��Jn�d]�lw�vS����̥9S�������w��x{�wkU��6�p�# (C�ߪe�p3	� 	���*�K���x���~~o���[''2�́���|h0''���ɁAWY�Q^+]���`�,�Տ�-��''i&��	e�2$������B����I��Y˷[�+p;	� 	D� �h�;GM$`0�$�Y+K�ـo��DL6,M����E�&yo8''o���+''�b�^wv�l���7��L��Ӓ/4�Z�"6��x8�H4�}�,�L�W�o�=��# L����e�$@u&�MO.I�`�e�>L�yx�m��������	���|S���G�4X+�	�
I[q���9��1���Wx*���n^,��[����K�OH�H�<T�͛JD5x饗���|�ș���j>O�x	���3U�[�l���v�p�o���;#���.�Z�ս1�vCo�yd�;���(Nd���$ҋ��(�x��p��H��$@žJ`ܝL''���/J�7!�V-/�f>�^�V�JoB�6V���,<7��_�Q�{�~q�f��T''���[�:fa���N��b}����%0� {���@ ���ʅ���=�������f�OX��g��9�Bk,��i$)�k����Y`<�4zy�r[.[c��>�D�zO��7K7nn%��d��R{O GG$�6�ط�Tr Q%��o�f�ٯ���{���''��NN�VKi̶D�#Or&���J~J_4�ir����rrԑ^�ۛ�OߜY�c���ͧF�	iΔD�*��p���1s��HNM$*T�C5]��������H����+�}�W�%`IJ��4���e��#{t
ۺS���Od]9���CJ�1��yw��l]f�c�X�A�:�7�nh��\''#�m���z:��H�&�oЅq0� ��� ��P�/7N8
T7Z�^�M6��$ﺢz���@Ћi���#�1����q)-VE}z�`w��>3�3�J��鐖��;n�������S5�K$@T�y''�@���ꫫC�7H��y�؇Ht�Z#��/*��P�g{���_tWY|>���Cgr2����N��BG&��`��j�q1B.:��o��F�����!g�I�1�`t�.e�$�0�,AE$eT�<�{h �>�8��G�''x�A�!���OY����''=qPe�}k~��?��>4�s�(���2��u_��0Z2�̟7�֭�x?%g�q���-G�%氢$$@$0������%�k�8��*��|J��jQ�v�y������	����
�G>5�k��D����T��cj�uC���Zt�+�~�_�m#I��?�cy�o߀�|o̒e\�HϜ�t�u͙JB$T��1O�2������ߣ�`�����V���� ����`�/(m�e	�2yGN ��/Q�q�s>�z��.B<��nc����̟~�17������xLv�
zG$@$@�%`�{xyRr�����&&&�
�]8Y��Fǡ������7nL��k�''5�,��îԻ����B0���P㳑�������4��sg�rI�<�5}���=M&P˝`�(	� 	4�@�JC�$�I ���Đ�������
��W����G"���m۶�[�ܟL&�Ƶ*���ֻ_���y���ަ�{�̌[ք�c��a"gҖ<{ܦb?{�����ŧ���$@� @�>��QN 
��z�-(����x<�o���O�>6���X̝Hƭ.��ރ�I�d�����?�H�mCQE����!a�e������7����c����l�B��gN���  �F�b�(�</	T@ ��z���-J��^��w9+��ٹs��ߒ���[�qP�ۃ�=p��7i[7B�?��f���!�G� r�J�즷o*���4��sD�}
�{:��lCp|� ��C���~�̱Sԏ�]����p�$@f�bo��P�6%p���Ρ��?�R��bg5ÄR��e�����w[�n���MK������c^w�#�;S	k''J�%+9�!�f����V;�ߒP�M�<7�Q��Y�H��[�ӄ�[_K��A�<����ǚw��H�2� 	��LT�g��;h8X�o�[\h}���#9޽;v�x#���!�VY�x���.oy7�q��e�ަ%�1ck/��<��k��R�[��O$f*�X�����Lڮd�͌��|��C��ɘh�;��"P��{���! ���b_�<#	�$ ��X迅���;̿�UX��ݵk�C��V�����G��w|��J/l�X�ȥ(��ג���b#�&�-W�ٹ�����d�ট�"�D���4,s^.��s6�|��R��s�R����?Lk}��B�5�PM�%0� {3�R�1�7�x�L&���ìV���/a��6��O��Ɋ��C��0��Y���kE�,��\u~�e�B��- �R�8��ӻ��R����A/B\}*^����5��3P�k)���Q[F��ֆt5����pb9$ �F�b�H�<w�	@���Jw:��3����2���_Q��_�|ݩV������W_��ɵ��_�ʺ^[�Sf����������f�g���un)2�زyW�''�W3G����96y�M&ͽ�F$@$P�*Vǋ{�@E^|�ś��;_T�3wz��=�v����[��ظ%��*��ܴl[��KV''d�����5��Vk���A	����þ���s��YǾ<�ŨYoj8M�	�~x8.�����#���b�h�H��%@��ة�`a$�z�[C� ���T+?��C8�/������f���:��A[^<1.���ݖ�]��W%d㲤�������UO�\<�;�)�F���؏u��V/�%�f��OB#Ϝ[��#�NNZ��	z-�)��^���$@-"`�~�`�$����������(Ֆ���u�����o6nܘ*C���b	�������2[����{Ҟ�=�l����\k�rC��f���&��drN}z�E<=j����{U���H��_U�m#c<95Z[��G��}n�����rP$@&@ž��y��& ���7r��_c�+����1�+�� Ƕ�+�+�nn\\���J�c���wKҲnq���cUR��%��|��83%�{(����mn<���{f�/=�Z̢n�&��4*h:����@gko��L�M�GG$@eP�/��I`!/����G�-�w�}K|�,���Q��B�)���lq�3d��C�zN���sҝ��Ώ�X󷞗��3������|+���v�6=�Y�T��]��y��`ZS��c�</��O�O;�ǖj��r*���6
M$�Z��l-^=�^{�5�l�?@�@�x��S(���i,Nd�!�x�X1[��8D+�T6����~��Iٌ2z�[�|+��fq%��SFL�y��xz�T<�&���%��͝�]9&��v��`6���Z�!<wܖ���h�{��" �� �����8p�@�����C��c&�Z��������7o������ݧA��n?����������gei�@�/$�ۄ|�I3��MG(Eͣ>�f�/.��9�Ģ\������d�Vk=�gx�`�vP?sh"�b���<q��,���(  �(�df�c�� �����o�J��ړA1yж�{�o��z�ǆq.�q?�2滕�ݞ��#o����M��1���.�˾��3QY	���,�''�l���7=�~vV|���*�:�t��\;3�����OP�~�����f`{3�R� 	�� �p��m2d�ߝ�翅l����k�2���� ǆ�XYm�ݻ�4��U��?c�/����3r�"��''d�ʄ\�����}s��~zJ�������?C�?Y�(a$�����d��#p���{f.X	��bV�6�D�H����79/��_���D��߆��>Q���_�ڵ�[��G���>��},.�5�\��B����������w%&d��B9�-��/c9����sM��L������O_���tĤ#1}i��#�_���~p0!��#{?^��jp�h���	� 	�D���I�AYZN ��qd��J��C��j����T*�''[�l9Qͱ�o�N C7��Q�~���J8�;��#��m+-�,�.��a�_����]�ȸ�>̟�c?7+>	�''����	�Od�k��[��i3,��?���yY"j�'' ���b�xƼBH@��	��߄�۫
��������j�����-�w?��\u�c�|oz���})+}�q��|[v�����)�ӫp��/ֱ����b��r��O�MT~=��Z��;f���&	���؇l�(.	����1��^~�孈� ��[����a�Gp���j����w��[�$��3�N��;�ߓvZ�.��|�ಿ���¼�''�����o��u�LT�EFW��W�^=�#��ݶ�=�Иc�!~N$@s	P��˄["B��7����נ��R��rؓP��n�ҥ�z��*����w�5-�q(�<�K''<���PN�n�w��s~R���h܅y��fg�|���''�.2nĮ��id��4���%(��|9(�#��$@$� 5���!% %>��/����!��vx��g�����P��r�����2C�=��-P��4��8bu���3G]���T������0��\�Q��|�����Ԛ�H��=s̖��y��I�H�H����70Oo�� J�� �e�Je�(_wώ;���X�?���l�6�ݻ�Q���Ka�=3��@4�����bp<���4}�]>�D�..3Jx|`٪̇�L$@$P� 9KQ	ٶ��߲&��ns�ة%��j��''dc�N��^X���p��s��
_��B�o���g��T�W��n�	��E�9���7&�>B89�(��c�bz,''�^p>�<�Lp/��W�aFЛ���FM	�!0� {�稬�g>�|�����Յ�9sh�ę��~{�Ǘ��e�Sp�I٫��Çw���C�ࣨzU-��?vuu��ƍ��:�;WL@�{+��{ˆ���
*�#M�Ԫ��M_�<��g�ۑ�[���6  ��	0��jdfpf�����PV���)�<o�''�_�8��G>��i[#\��~W�3���z(�&��݈���J}s�/f����
>���C�W	3S��k-o��iK�h�-����I����>��5�ЍDL����|�v�K�����
Jj�~#_y��9��-���j''
���1_E���T{,����w�|7?^�z��K�3��9L�֏g����Bi��Q⎍H�H�H�z���YK�����s��6[���9�N����o���
�ċ����+K�_����Z�
���C��R��i�s)+ʽf�g#�I@C�͌��������w3�w&0��"�X8t �� -���1�!׽������շF�^$+re��Aq��C�����n�羛>pvc��@��$���311�5m�\��ȣܲ�"��_oڴ�x�r���3],�q����^�g''�0�Z?<�H6_�w�l�/���1��d#���x?�n  �j�b_��;��G��������^�+��M�w/Y����:�����Ǵ�k(��B1	c�:�"@����''�m_q���&��ʹ5s�X�Ï��\5�	I��X�3���������aZ덼�Z$-�2/K$@�%@�>Ds��b�|oQd�G��:�����o[�r�6(�7!�ޯ���7P�w���a,Z�O�oK��9�l�����5۷o�y��r�&�{:��m�=	D��������7��$9˻#��sz�{���s��Vb%�"��.Z!cF6�>��Ϡ�$Y�HI\6�8���ac��?�Բ�d��dBȒv���f�瞞����*+���FfuMOwOWwUw3ѕw<�O�oD�A��/�wu*�&�!��ܵ��;g�\���@@`e�_���}���*���EZ�X������BǇ���q�Ͽe{�S[^B�w�������
<XO%���B�?�k׮������7��\l�=;�G��[w?1��ϺK3��T��js{Z��ނ\�����~��Tɹϝ�[��mx�p�!�����*ՑU�+�G3�/�[._t���eL����ͯ�ݗ�L~�֡���� ���ߣ�E��	B�RB�ރ���۩�ӲJ?�3褞�IF�_�0�������cS�SS�����y��a�0����m��''KkV��қs7�*��3qC�7g׶m�
�l��

em�@]��ӑE�x��K%����-����3��w���s�Q��/�ك�i�C�}f�����9� ��� �w���_"�[Q���5�QZ�\��=g]�OQ�ڧ�[G�T�� �<3�z׃��{K���\��ɺ:R�zP�R�ّ�����?W�Bt/s�����&�z
��9�w;�N�2�ls��[79��c�{��}�T��j�Io�К��@@`��~�^sN�R�A���"�R�������g��U�/^�yQ\���������߀>����߂���s|�߫��Hw��''���:�k��7�6`�����ݽ׹/0��[�W�:7ߢ�E��m�W)M�im
���.#9G=_���9�	�ޟw�nD���2�\Ɠ����N��#7�[���	������ho��yzI�2������Q6��&�����"�����ܥ�)�:�Mk�;gڶc�)T, h1�o�Y\��=��e�|K�{��kU�D��;/���s��s?��2�V�=z���������0R�z4�5������X�խ���[(ӏ�L���T��Ml^����� (��w��;uN�?�9�Q����:��j��S�9�Ι��Y%i-T��ko�/�T��&m>3�ۗe��0���=�=�$�f��r��l"j[���i�0��ܖ�:���4?A����:plנ+��v�U(w@  h.��7�u�G�C���|O?�ۉ�����ؿ͕fƫ�(y�ŏ=�߶��g��-p�̡r�Oggg5�ً���?þ)���"va`aM��)�����K��{p���ά z~,1���''�{�e�LXw�y��x͔Y�+�����a�ǞS3�n�k����D�I�$����sL��������vEt�L��|oA�s�f�4_�\�H���s�󉜻���z�1��@ �-��}��$�_[[ľ�ˏ���[��>W�Ce�bb9	��b7���Z.�F��v��t����2����?�7n7��ԫ�?�������C;����t0>�@�����c�z�_{X4��^��UJZw�}f��������T�K!��<�[��ܶ>�Fm��9�7�W
���:Ik|q:v%�uf���|�j��8�jʯ��d���oI܄��''�g�os�nJ�B���@@  h ��7 �f$���y���i�����HeY�~���� g��·�/N�F��#����zsg�8�F� �+0� }�N��п�*A�꽍���pș�Zp�Ǘ$_���M_5zS��=���G5�s�ݯ����/@����_;Tr�m�XC�cyE}��&����Yϥs�ez�Fx;X?_��}�Pˡ⿭?r/an�%�͟�O��
��S3��z�����f"��f��B�c�>��K��kk�k]V-u��m''q��~�O��c�^��էԘ��O�<��� ��p�u~d^����� �(c������3�߮�N?��~jYe�"�3�|��?:��+����9�>.Mwź��4�Ȅs#zd$�����B`R�K��c���Q�_*���XBԪ�~��N�/�����C}�F!�}��l`:�Z_;���X�h��:�������1�O?�I���!�1�D@J�]�Ν�Y2�f�~�8?��u���]��a�w`߅]���D��m��������Td�]��ti�F���ب͖Ji���s�M��"����&+WBS��oI3�`��7\��@@  �2�د�Ϧ�����/�T͜��kY[_��^HUY��N�7��(I��أ����g��ܚ���Wa���z�@:�cw�q�M%��&�5�5yBe��e
�nfŇ����opf����9/ɗD�LS�ó#��R�a.+Ȁ6���;I�y��3��{)�Q��v�/�L@  ��@ ������&�>4x!��[��;��k��|�;����/^v�}W~-y��������Sꩧ�)���\}wJ:W]~H�q~a���ؿS��������/o�bJe�n�~/�LN��y��c�Be_;�7�D�^$�HYwO�N>��j$��-x��&��%�����{ZOM��+T> :�@�[��/V*o�H�VNj�}������2��l��c5i%�_<vQ�ڗ���X����������5g�+��5$���B��~~q�*
��6*�sؿ�.?8�o�ԲSH�tt�H��Ae��SL��z��_r��''C�H����A r:{^FO��L�U������}C&�YM��]M�!L@  h{�o�&�����*��;k�$	{�kl3z\��7?�p9gۿg����m=v�6��^�r�&H�G �ׯ!�/�r���1��ZCܮ�����	�`�Q6�Av�~5=E������=��|''��m݆	�B���8<�����	�"P�#���|7��]�C����T���-x�@�,�  �	��%k�m�G�K��$I�mǼ��o��۲Ǖf/U϶� ���ɯ���֓㽜����z�A�^�����׸�� T{�������������{���̾��Ν�\�e_k��s{�8Ȳ��������C �3�/.��_��PT��h�ay�o^�B�-�@�ط\��m�@ �-�P��>t]��`mqz%�OE���8�h��?Q��7�=�����''�S��j����� ����zW��D�E�7���ԯ��?�<:U��V*W�ʲK��Vgv���/������{i��Gl"L@  �Y�.2/#z�U�+��#�g]�Υ����ќ��B��5#����kpĸ�~R��R�勮��9��,�b�VW�l��k�S��GY��[�ۙ]�=z�wnn�m�MI����z��C|<U��r�p���7m��Ջ���~ Bp�uάT�����qz��?~�[P�t=��y`���.�p�AH~�f�sjj���.�	���@-��ע�I��=p{���RK����tz������<�ͧ��2�.�r"��{58P�����%܍W���s�|��_�?��N5@腯$��^����R�?�c"��w;wn
�}$��i�*�e��	��<��|��6��{Sd���]��Oe?�%����C��,�
-�@ �-�@�R�AuU�>�]ž�Y6����,����G���/����''�|	���R��/忒���������-�ܲE�R�,?p�N�t��a���U�w�`�^�3;[Nܗ�]_$_*�g�9x-��6P�UٿȺ�r��>_Jm��I�V7a�P��k�''�
��@ ��ܢ�>��rKm1���r�q��ށ]��^\^`?K~=���/���H�|�v�	�OC�ҹ�?Y[�e��H!�P�Rz��,� ���.�?�ݵ\��<}H�^y�3���1O��ȣ��/A�	��v�O���N�|����3P����<CZ����4�	��ľ~�#�T�b]5�b�+�n��o�������ԅc5�%�^�Ϳ���D��� �"��D��1���¾������x�l5��a�-�X�f�YR��ٮB���܅���o3��֎�������|����d�a� ����k�E��zg�#�}��5,�蟾��I%ymm�:���&��5�x>���KN��eW(^y�}T����_��S�x�g�D���$����g��Z�a��^����kV������MT�P�`H" �4��ߗ���a����*�J��=��;���l��:e��2	݁@ �����h�?T�rV���
=�K����� x����w�E;��E[n��%3''\r�16�+/�N�^�r��Y��O�I5;Aζ��pI��R�������ɁWVï�/��K���~r5q�5��=���߅b�n�����@CЦ��n�z�Ӟ!���s�t�ם���WN��Ǟ.���ڽ�����@@  �0�o��%4���c��=��z�K�#�;����_�����D�;��B��a���\��=3����d��r�W��Ϝ�����T���eϽ#T���l��j���g�������՝�F9�������z�s�D��@�Q�p�ƾ[=�����! ��!���x��e%5�Y�ං�o�Cۨ�](��<Vr�빲c%B0��@@  0�߄��|���c���ڬu�|�p9��v�뢁k���ט��w�OfϺ��Ǡ��\���.<�n���dMh��;^���.�x�EC�z�<)��C�o���\v����?t��w�J~�����u=�}��L��e@����þ�]�	ց��[ܖs����eNB��r>s�����# %���X>�+�h�k_��}P��}�+wf��|����ɒ;9�)���Ph~{���@�"��&���]����c�7����\IO�S.*x�|�V''�{v@��[����E�ND�vў�,"��D<���&\����|F�5Y�h�q��~ζG���AB�2������Y�k� �?	��U^���7\W�Կ���`�:���@@`��s����)/=�+��qgG��?qޱ{���MG`�ǹ}|����P��k�;��>w�#�G���J�χ�q=X����@@��~�[1y���q�����ow�B���ѮW��w���]]�m>���g5������$Oyb��D��˟6�h�+\�D�r��^̂�0wv��3P��f''�V}��>�Yk?חJ�Y�����~��Հ��
 /����������ڟwû�v�Y��$�7lwf��6���S~
r�e^e_��?Ǳ�Au9C+�n&:�o�^��a����L�s�l���W%�4��/��4ޝ����]��h��6��|@  ��@�� �A����Hǋڕ`�3}Y�Q���]O��%����ר�G���J�z�̝�^�>���R��r�S�""H�eZ �#��l�q������?wn���_�_�|�m�/�D	����#Ct?��^,ø`��" �ok���z��W5�;���Q�ӥ�}�/i���ɉ��&�ԇ ��mc���>
M�8/��rݎ��7���Ƒ�?7Zf]��9E  @ IDAT�십��h}}}*�We!�������*�܏,�Ӌ@��_�Ѯ�\Գi�����HݵA���g���G5�k��Q�.�@��_������c��^�FE�V K[�8��t������ݮ������������
 �j�wb[�hW��@h=��;�H&�6O6��h��ƙU��H1E�3�q����:��S������F�aۑ��Z�^7_NܩKe��+�?F������0& �G`�?/���b����섿-�����e&*�h�7�����z�2Ğ5��Fb��5_�#�9DP2�	�w��+��z��ю{-�K���6һ�U������|�����p�3详�w�o����w��#�[��@��6��3؃�5��@_���Id�̮�Ƚ�gVi�D_j�GP~���mT�!��C ϗa��i@��3A&����wg*����xf����͗���i ����@"��5��]W����e���]H�kT�)K���H뷹���DZ���Kb/?�}2x�s3#�8��G�;��?ka`��W���\�ϓ�C�d�/��.�NV "��L����C~����|��~�� 5�-��e���uT��a_�eU�4��zz�M5�mC}���7��&",�?zaA���D���k*�������EoK����;����܁-9�4����Abߊ=%�) h�ߨVJ*��W��A]/���&�z�9E���E{_�t}����G[nv�����8�~�Ex{٫�k#��*�xto�����]�4�a?�$�v���J�@H&�EE�O&Ҹ՟\��}n�"�	��ľ�£�sn�C���f��A:��޼�<n�vLB��E������kq|�����~����''&ŗ4_���/-���Hls���U��gb72Vr%��[���͝VX܆�> ���o@[M<�����ڏ�v�G�~e��E���65z�͛�"�l�|�%qgg��x��?�8	¾����|�q���5K��O4x=����bT�''��z]q]��l���϶�*��&?����?L� \���� �{ F�bK�)��s��ݜH�2�h���]k�l# b-)�V$��`t����SV�"RMmė}��j��x��� �{P���vK|�k#n�u����8���dZ�VB$�% ��@�W�ӺB�Q�H��s�c#�b?�z	S9�1��|��%���{�����W����X�ٿpɎ�rQq�����α.?����d�s"VX �u�25������m�tÎ���/�;���ݮ���Q*���1��''m@�ww2�����	���@3�ӯ�c����"�j�Gee&�p���"�]�����C�����o����h�/���T�N^,�d�k��@�1 \�@�
���?�Ы�q�jS�۲��e>�5k�q�5�v.}Ց��c��]8[''�}I���/����ֆ��r��9��P˟��o)-��3z�q�c���7<�gK�	n)�ہ`�!	E��H+�s�vi��%�"Tk�$C��˼AڪKv;�}��=�F[�~vܟBQ*��������&��3�6���[�4U�ifKw�B��Z�C��גv+�m-�	q���� �}�q�+����"_�wž�u�~�]''��]����R|「23�%W��{���e��MCR�.���<�B�iz�!���K;� �W��~�]�}���ԙf�g�A�ڤ6(ThWDjS���X-�9�����Q紱��*�զ�Y�v�Y��\b�Yu��C ��-Q��	6mԾ�Z�Q�o������;{)���l��i\��T��l@  hI�ob�����^�T���f���.���x�%�e���ϞZֻq��w���H�Ϩ�2w����O������=)1�ss�樲�\���~�tO?XKM��ܝ{ey�k3��!�O�w���ZRl�8��4Z�DW+4G(Æ#�3�}��b}������Z��,Rz��ϑ^0��@@  йbߤ��c�=���j׊{��B*�ml�~g����$�o���e�u|�����Eg�f�kg���H�DpD�(���z�4���ٶC���gc7I�E�C٧M���g�K��R�gJ#��h|�	)�6���A�ʾ�p(� �{0�ú|��=�s�ٗy�b�!:�1&�4�c��o''�oa0��@@  P?��׏٪b���C�ROm��!��o�����K���$F���̏p�6s�@��ܜ,0kgR̔�\>�kHv!�B`���-eټ�=wѓ|��O�5����^F�	2M�%<����n�2S�ĕx0�q�M��C1��.��gfۖ";��ݘ�}��œmV�P܀@@  �ib�4�+�M�ط���c�k���:ʹ�A6һ����p�[�H �MjM�������Si���A��1	�F�2���.�ޓ~]���u�.Ƥ��3��.۟�砻�7O�ڥ�B9���''��h��Ԭ�A�+���hz��������ͯtV�Ehb�5���x��7��>��}I���4�оA�v�����w�O���������3�G�uP5[�*jP��xA�߲mԊ�$욭�����C^�W*�O���,*��t��^[&��������ЯH''�c�f>q�˱�:p�Nl�z���۷���f8O7q�E����F��wY��u��f0~������z<��FJ��D�x������1�L@  ��oB;����Y��km}�����Df�L�#e�5W�AP,��g��j�N%8m�g���=�̖`��A�w��_��ho
Yi��}����Fg&�XBAc�ד���Ɵ���xvBz{�nF?5���̢�o_���oOS_�:?U��do�T�E�0������M>����y��ʉ(ʍ����[w�~S�o��D(�: ,�@ �K��N�$Jn�=O��˹T�b1�񼛛BėJ�ӪMn��S���zh�D�~�t�}cF*V�Y�$u�ա�"��qz";�6�Ьʮ!]�I�j���f��it��m��1W#Sݜ�2��촉�ҕ6��*�@ϥ�0Z��(�Ͳ��U����"�q4�olN+�\W���`��c�V�]��}���Z��jSj�p:�>�_��B))��n�sh�ܣ q0�a#�r�|�l��GΜb`� ٯ��HO�0�;��%~�Wh!t@  Ёb߄F�DڙZ�WJ���z1��SƇ�q�<���Q��ܬ@��]��ѵBY�A\����n
���/�܊��D�ߋ����Ry����b�]G��K`��qz���|5�5d����"�i''���oEऎ���k��9�ω�f;��9��B\=��X�\sM�]*qNy��̸�y�����l)�~$��t6��;����cӦ�2G��vG���<��Y�$[p/A��9CD?�pI���Z�����%��̑��O=~�d>�F*�d$�Oʕ��d�9M�+�����@� �}S�::R�~�&G�(
��� ��PK�U�Z�}����tq�5b����3�}��6���47w
����`���956uu�Zue�L�/��MFG-U��h��|]�cՂ���P�L���E�$�G���a>I�f��턮�П>����wC�wC����\=����[�j)[��O���]��٨�kD�M�DF�E�q�J�!��L�ԷW<��Yv�O�+���.^�*QT��O?qf��GΜ@�?R�P��F��n��J�	��@ �Mh�|_�oUf�?@��j���s�{��2U"�;�������El��|��S���lۋ�����w��_''�y2�f�d���Ť�C�2I�W��E0�A@8�#�j7�L�~�=�I�W��$$ornν0:��g�|�]��"h��T��w5XkaFP����+�݇ԛ�a*��7L"vqI�"�I���I�읿r�$�Ӑ�Ȥ�M6@�=��cþ��ݏF���˹W���e;8`4��@@  ��b�̷��G�/<������&$��I�����$�����/;���������k�� �{+����0a��4�ɤ�3,���I���v�Qu[I���-y���`�����걒�s m��67����^͚y����Yq���7��=�sn����;���n��?-�%�"�r��������oT^7�QgX�7��3~�p��͕$�9�\��,��<~z�GX�?Biذ/?�����{���v�E����D �&��·�/c�<�Cg~�oƁ&e�&+��"�(��3�<�4_�>^���f����ղ_�u\���g����%�መ�JT1w��*��\.7��|��)�3�Rif�u[''�;�#���^L���a%�_�d�X%�턁U��Xv��E��/��Mf3��2?����f݆zk���9�6���~7C�]T�2��93�?8��&���{�����@����''J�,$h&t�PQO�>��0��_��-��WI�S �q�o����O[[�F���ȡT*�� ;�_b���Ǚ���#���o|���f����@���;���]���~bb���r�K�œ��d�|1���O�s"�l�g�4�v�/V�x���ɿ��}��S"�qOn�h���NQ���D�����>�C�X�������;V�@6�WXS���^²uB��2i�*c�|������[�?؛w��J]��PGT`�s��]��Q��7����W�����Xv���Z|�^�?oD���9����"bpl6Ս퐻#*��^�M>]�ԋT�E�J�qy�H=C&L�K57~n+S	[_��}(u�+b�O?~v�2��2���''������w�`�����~�X��+_�ʷ�H��p�ƺ#��Bj��;���?��O__.͊�_a�4��18�>�_E��`�_u�E��~�*)��K�''r��&�b�e�|՛ۮ2͐�K�~��;��}K�%M�i��L���7G��D���f��Љ?>6+m����L�dk_�=��D:����]_XO���y�m���4_D^�)��<�����Ǥ��nR��f vR��^$��''?9��������|nd*?q��ܢ�N0��@@�
����;<��_��/��������E����w��ߗ��g��r7�$wlY��,�-Lߏ}�a#W%��q���$�ځ���X�KMT,�a<#�At�,�&9��׻6_�����0��m�s��6�Hz�zݍ���О_8Y1�4��i''*���Km�����nXC��VD���C����:{/���4G-��Ǥ�{ݘ�_D�5��v������Sq�$�Y�%�����9�/��}�~��f���ވ�A�	��@���O>���r��AH�[l޷������n����[^��w:O~	�s�K8�e�������w`�)zSM&�w<y�g$���X[- UUw''��}F�B���mt�z������Hi���n�v�O�?��mR%����g/���x��v����߶��ä�L@`����L&�W7)<=�i�W��	�-��?^"��[;ď �{)�^N�x�-����g�🎐��ҟ�K���p�����ϙ�݀@ �h�''O�������D��z�B��+�ʏ�v����xx�0�J[�/�/  ��y���>�T�6܈���ڬ2�H���o�@�i�V�Nd��٤�~�4�km��{�o�P�m��u�Jx-G�5�����3��~��ݶ.?��ޗw[z�o�Q�:+IoӴ�v������f�];��Zz&|�,x�Mħ����dV����8u��_9s
\N��ϳ�?�+�|��Ϡ��~�vG �$�т��9r�FGG�k��kI���a���/W���as��/�j3~��u�-c�R��A�4����_���}��{�A�i\�}�ԫ�PݘC�a;���:a���;o���Т�b3L���Hl6�F𭻐��k��m	*�-֍Z�8�H�gl�;�L��n�D�Z�Q�)w>�v����ޢvf|N����Q�k���
���ٰ�t���O�`�����˗r#��d�9��: h�_cK�1��>���ZG��5&��翁��G~�5M�''���������h��Pɏb��f��b5n��l�}}lXI���R�|�a!]e���V�dm���"�"�U�@i�uwUk�~e[���"����������;0��{"�7�̡�����X�: �X��:z�����&��_���*>�z%m���&�I���.��Cmr�W��z>�_�TrQ���9r���#�G@g���G�I|���z�U�o�3 h}�������-�$�MuF͂����J��o���̱��(^R�E��z�7��+�.L[���JR�vFC���e$�ٻcoXjU��l�c��1�*0��G��[�/�^��''�Z�P	��rh:���طYOM$��D�=�4|�ꥨ���|w�Ϲ>����z�}J�ӵ��޵��D��I��k%k$��!�>#��G�y�/�.��M�Q�ٮ�ݜ
h�M;��k�٬/I����N|�K��.k�pl*�د~6��п����N�5m�Ƌ�B���Ç?��l��D�u�s�țc��cI�E!��B�����Xhbg�l��j������P�`/��ށ,�aO�����!$�O	?��Y�th2(��G���د��y�>�blV��a6��.���	߮Ѯ`����Ɉ���!1�.S�>&���|��_��47�������R?���f~o��~FU�ѧ�rz*���3��d?�������[v]���@@`C��*p�ʳ����1�O��H�7����w�qǟ���G��3~��`yv�U*�v��X��60�a�{�[̱C�hԲX��m�''���F"�%+c��X��]j�������/G��~A�_��xot��N�k��d�W�T���Y��]�9FOD����d��6��S�z�f/V�X&��t��j�Z�JZ�_��{�Os��^��( ��@�6!�BWf�G�M )*����)��#}�񉗾t�T���P߀�F"��
hC�`-�/���-�����)���!狢10�;��ɖ��\iv�ťy�$�:�la�����̛���*_QŪ4�''[|-#�Z��7�퍈��,51i~J�_�0��XC��Z����H�o��m�~@r�nX����w�����/�?|����T��ww��1���u�M��hz]e�7zC-O�q������y��Ǳ�<��k=#����F�g`������aZDK!])�$%�����v9�H�s#���������ݷ�ϊL@  �:�_''��oC�����7.�}U''^fl2����������́�zz�l%�]ynVD�X��m������&a�춺/W_��������:̣��f������ �_�K,�~2Г�zoiG�4dr��c�:�N$��Ќ3{���f��$r/i�=����G��c�P�^����gG|�������ވ��g֋�����/��}6���k��H1��!��	S*(���-�G��B_G�F�{+�y��s.#.�;A�''���Xa��n�E''���@�k�b����%�����yM�@�?���[���&�]���>=�&�ϻ��A׷e�X�{7\��˩�v���껞:f�����I�!p"��^ԥ֓ͦ�U���GVFd�����(�������g�h�E�M_<U1�[�}��-�/�M�S��el��z���K���q�Rܪ|�ԋ�Kzo��*>�r����¶�Y�d]9�LӦ���q�Z��vB�E����N���O�=�˹���˟H��N��N����{��*�V�����*�n�`�V�����H=�֋�n��8�~쮻���#��|�)�r1^XΣ���`�:���Z��I]�1i>O�d�|"��nTI4կ�J�DA��& ���?w��4�/�nn���}�!�2S��<5�1#���K��>W��Bfɧ~��$3�o~��|bG�J�yb�A�x�g�=�=�R�����9�r	i�"�.¾��b{*q��sO�9�Z��Q!w��N�����޶�c�tz����@�{��CR/��kl�^$ٹs��<xpz�i�:������r~���wb;u�Q�;�/��mZ=$��6W�z�6��N;No�3i�H����	��p�}�a��Bx��Q��2�<�P\�M��ɇ2�ʽQy�@>N��d�rI%�!����g�<�
��Y�� �n��q���49c���!�h�*<�$���+�M0u��F�W�+��a_����>��g���;�S�Br�U���c�n���߀@�"еĞu�/a�/@_����E�;�x~��ckM��x�9L���VF[��R��F���_`߇݉�I��f�W=M��lӺ��^�
Ҥd���kPP`rCC�`��@''���X��mu��!�H�=4ry4V�rD�2I��;�5��_���O7�ɔ_�����zd�ǹD_.h���Lָ�ڛ���v��F���4��o��qA�_�f�f\ߧWmD?9����{� 9`��2u����?s���O�?K''�p8U�K�{r�S��.��}���`:��#��=�ܾ��韆��3Ȣ��mN������o����?Yo��^*�4��H$��ۨ�7.U���<�]|��H��~''��k�!��a�^u>H~�n�-5o��ڹڸyO��$���}ȹ�t�,Яض��桍�<���sy�K�H��v�_��^��A��-����]�Z�6R�Hk�oD_ͣ�R�OcV8� �\Ap�%F�7�@�/CT� ��ҪI��M�E&ܛ:?GCkC���J�����
���|��}�47��Jt�oߩbo��K���)�`�@����B�6�{x�����Ǿ	��׿^֒��>}z�ܹsKJ��ӱ5&۲Ѩ�k(�G��l�BvY����}�9���ʾ�q������@;�2>�$������5��O�%S�f��,�S�/H�;�%C=�B�h\]o܌G��-H�I���܋��+?�Q�Ue�x�?�_/~��2U���$��xA/�-��u�|`D��W�IY�x2��PZ2���8"��Ռj?��so��
��=5!�6@Wc��~�;-V�f��k�z�4�''s��G��Q�ӌN����Ɯ*���{o�9n�?�F�+������455����oXc[��9���;t���5���h���˖��رug�"	�N:��g���Ӣ���J�m]>$�S$�h7nY��@�-�/��FZ��+!<���ƺfs���=�1��Z��8F�U�1�қ�7�_�-KVd_9� 2iD?�o~��BX�"�~�<]#�_ԴI�_�lM����Z��y.�o��ʚͦk��G���+�Lc�&ތ��� ���� y��J5��^f���zM
�6=�$���l.ʟ�gr	����\���;��L�
?�MG���=�⽒w�/b�ӻa-��(q�~�w>����s�
齰�_[x��>
�^��vt�l����"��2R�Έ~�H�Efe9^ۈ��䫾R�g���f�D����X���!���Ծ��+��@�!`����$���LB/�����3��=���+�����D��B|�Ϻ�#	{1	#��4R�����5/.��o��Cp���Z�=g���r/G_2<���9Ⱥőv�o��������ؽT��p��ض����4����(m9���:~��K���70���J���r��������L��� ݏ{g�޻j[��@I���_G?�[�;�z.�6� ��_�!���y��K��%��� �z+�=�-��1���h�B|ee2(2�	$Pu��>O�4r���� dMo����d�24''~YF�A�T�7��t�@�7���" z����]#��Iʚ}��%��0�U�g[������Oh�)4�٬N��Ō���<��̝�qD�}���ks�.��"�J��6��gk�i{����7
d��uˮ�.|H�J�� �~\V~?y`�WyU�(��7�2��l_�g�O�L�blt�ؗ;s~�ҹ��| ��@S�(b�C���u��@�C�Z�x�L���e������\�+��
~-�E}D�ތ� �@K2�!�J�k�m�]�-nH^���/R++#b�����;w��Le_�Oj�����DN��o�6�$��l�L@���ҋd����jt̚��ï [�k}j�Ik�$[.9����!>�4?0�PbO�E�3�}d�k���0�u��� ���i0�K�����$^�`�C(�˷�,_S��yrOj����$C$��$�?�h �6����ee�2*E��J�Ҡ��򕷬�?�\n��r7嘑���ᶺ/>7:>gE�].>ח<O���Ψ�8GV���^t���oD��w����4����d��o���3kIc���Ǳ�Z���P�����

�T2�L�%�4�O��|��6��Ⱦ�4T�6�c��"����ć�	�1���cHe�Ks���\6�''_vsld�@ծ^(�$�F���x�zRo��HȔ�@�n�7�M��=�!~��Ț ���n�g��j�lm��E��MtE�''	�s/�M:jU��2��f�=�f���b�6��Of��O�Ǳ{^�*�C$�3�L����sL͟_ؿ�B8�D�q�SL&,7��T�҅���[͟��k[�m���$�''3���&�����|>w6NJ�r�l>W>w�{�i7#�`�C�#�=�������x�w��ڗ���l�Px��Ç?�O��/U"��zzz�/��jn���)�v���V+[(��#�/ݒ$�o����n�9�ą��U2���w��&6t���}�,�S�^ج6,ؘt�r�vz.��d�>u�lϧ��6sN���\����Vi�򐧤�mb�a�R��''��k�׮����jksm�-�o~�Ppq�d���F��yڜj��H�P��س��}"}sfA���ʓ��L���]4b�#����=���)U��4���vg�吂 i���kͽv�Ru�+�f)|�*o�*�k�A!����P�YP\*;�qe;��Rac�J�O���h���_��$�9��s�s�R��S7�}S�q-l�Y;mO�=z���ܟ�謅ԟ`mΏ�r�_���Ť����v�[n���ee�����-X{��laC�6�*	��)�çuk��q��ֈ�5Y1''Kb���"�ڈ�
경Ծٺ���_�H0���ř�ͳ�� �e�����
|b��y���Ny���6�����Yw���ٛE[�8�W����2��뵊D���+�������a�	b05j�&Ѝm>�	#Sy7�oY<��b*��!��q�5���F�	�x�	|]�&n�x�8S��!Y活>�6��=%Ҕ�?*O�,o�J�EƋ���K���s-����kJcyY=ȋ{*�:+	yY��>��Ψ���'',)S"M*��(j�N���.N
��T.ߓ~q,�ұ��l���''�������\3F��i*�`���''�����F������ڸ⣻w������O�w���*��p�^[�
�۱EN-sKٶS�{����X� .��g��͔&����H&�wH��Aش\�Ӎ�(r��Le_�a���~�:��ah�z_]��ͪ��"�����6�oZ�gQ������8�{)��˛��2r_��PU<H���T�J�=�LʮI҄�"�"��c�
����J�^��(�µ�o0{����������N�C�K��Y4����:�q�}�)��o�����/ �J0��un�*�M�X���L�x)GV�5	@��u^�<gi���������{#��Qn>�j�1gA��x�`5���OH�����<({�]ݙ�� ^�[�#�/Tql4�˟��|O���T�߰}�x�$�O;��H���l�J9r�qS=��c�n>�����B=�6;,�	�C�y��4��ؕ���BY{(��cߏݹ��	�w�4_��듘��NQ��5Bˀ[���$_��/''4�
u��/aԾٺ�Ni���&���~M�mj�������ki�2s)I�?R�+�W������n�T�"W�MqRM�+�6�EK���~�����׃"3�d1B�е�%ޤ�p�����=���B���$ľtj�jZ�"��}Oii+X����`�DL	���F�}�ă���-�z�$4��D�-YjRGu��z��نx6������إ���-�W/i��Xap3c�;�Sԅ�ԗTA��ʤlU_3��]��;��֧�	c�ԩ�W
�JGUU�RX�MX|���3��8�Ǟ8.�Q���D��t������vΗ7J���o��߼s焞K3��ښ�3K���h�/�y���u^G��	�r��W(̱�6܋�ⷑ釱7nx�!î@�V�[�H��`:hhk44�g�^V#	gED�U�N7�c��F��o#گ��@�hZ�2�4_V�t�$��|I�{4��s���<Sr��W7�7�Ř�ߩy�N1����YE�Dԍ+z� M��B�<�3���S#`���:�o~pP�V����M2U|}���q��e��	�EDe �Fp�FL�D�M2
E|ݚ$�صM�T;7dCH�����N�l��_i��	%��£G,++aT.*D��?-?�^9^s��{w���&%��**d=��EPΘj^$�!��#�W�_�\Rt����-�b�&��0ӵ�#	�aC��%�/���/���ɡ�3Q�ʹ''�/���8~� ��%��d���;�FL?ӎ,��l��<��SהJ�o�Z1y`Gy�~B�\����P�a�������u�](�ב�G�����C�݌@�!�0��7[��ϸ}|���v�`k��\F�4�o9����0�}-cgٷ\g]C�x�M�/i���U����������Y������店�H%����&��S��g�s	���`���7��_#m"Fr4��\�>�IM�j�����j�r�$ࢪj����(j/5-�	��LW����Ykt"��p�ק�R�9����ۛ�/�u��c�J�''�����WR�n��./\}<"�%`|��i�h�}o�y�OL�d��S]ҧ?2��f��$�''��{Bٽ¨d^rOl�!����+E�J/�za,R��Q�o��!zZP�&}�� �7�	��ǋH�<s�=����|17��h�%���wt<w�½N�L#жľ\.��� ��K#�[��������!�Ǖ�S�%����H�n#�`%�& ��H��ܴm�''&#�Rs�ow�:̣��o5@����m��ڽ�+�?k_��+Ѥ�����2�ȕ�kk?��/� �jk[��j������g�8d�5�E��Ew����s6����{�ٲ�0����b���5�Xe<�Z1''桵���~)I� ��H�''M����U��ާHp+?�4O2C���''H���ʋs��X9��a���IkI�nyu1�2���̚\�F��U��''�''�^��kj''�&��a2�R�<�Ӛ[��[�g����KNj|m�g�:ɠ��u�T�￺*"�I5��"��[���<&cS?�:E0 ]�:�m���1u�5�9#��� V&E��I6�E�]e��d��z����{Ʀ���g�/�z��|}]ء/���ܾ<ɡ/��}���3�7J��r�B��^��^8t���� mK�餯�
~��n��!ֻ���^��V�k�o��$����m۾�4�B������A�������C��]��}:�&6jU�E�3��N�ĹZ�I�;s�@+��t��8�4r��0,[���b%�*�{��k�/���܎QV��4S�{��9���R�����˭+N3����^�hfyrdyi)Ӆ��Fa��p�c���p�RrW8~����z��d���I���l8����$�u�-@�,�ߞI�i&i��`RS7鿟P�f�fT�Q�&�S��E~E�aj~˗?JR	�By�%H���[���>���[��z#�L2�����Wy�W
Z�_�	���_�����YM��� +�i�7�RCX�QY�������"ZX���2SaTFLLy����kث� �KI)�#yjdl�)��+\��/0x���A��/D0�@ے1:��!��AU����!�Xw_.P;�S�����Fօr��[���md�!���z�%�z{d*ݝ"���C�_{���,��~��_�ǭ�/_��%~���ů���u�h��o�=��D➂��䟸��t�.Q��l����[�~�����@�]�4�����k{*v��Lz�|�(cZ�d�ك*�O����E�Z�V�d�d?ʧ �(?@������ϓ|�@����f�o��?�BV|\�� ��D�n݀=����t\�.l�*⭖�ĊbS k7�>=�����x�&�0���1?���L �*�5��a��
���R`BQP+�zYX�Ǘ;K^���_�R�=y�f4���Zr�Wِ���Ն�>�~��#��I«�ԇc�A�&����7CJX�(#\���Ve&�IU�&,D�y<�ʗ���W���J����_%��~��R8�;��ӧ&�gOON�K�e+#������r��{#�
��-��?�Y�Op���r�m�>�T���(�	�����f��u1�Tك[@`3�Wn���$����j3K�����͎ӛI���H���;ݨ��K2:mG�����En?Ӵ_�s������?{�o������7�,쏟*�U��B�?������Hm� ��9��������d���h��+8��x�(��=�G����q�TJl�����ůJ.�Z���D�i�]��H�D_ͣ	�LT�/$���Q�2�٧�U�CT#�YXZ5��"���$R�%��!	������������_%�Q''�@��tO~mIn�
�����k��p
��zBb�  ��j��������{.Mh�7��Mrp�I�=�W Je`���5s�F�U��h"�b��I-��� "�r[�K��T6���@�_���?�Sj������H={	PU{�|�Y�~ـ���T>��re���������m&�S''F''���I���������G�v����o�td�T]uѶĞV���K���^ңM���k�*>~ǖro��<D�?����i����@&���(b��t�����
ŭ��Z�J��/��|>�ڈ�ێ6�_''N�4�Ȼ��Ƚ�3��̏]���D�bP�o�gE��5�h3���"��M7&��3��]ojO�t�B������W�¨�I`j>x�?�_/~�\A�snq?I�a��4�7=�P]H���$bb�(�b�1|ېj�4	9�D8��$���1i�>�dJ5�H�I��r)�%��ؕD�Uj�+���hv�ݑ�u�4O�K=̝�۝�f������g�p�(I˭���M;Qg�,��S,���Q	$�秺N?{�˰���M @�-�J*�����|=~��j�~""W�D�2�ύg��c��Lz�W�\U�/	���ʑ�Z��Mj(�� � �����|��J�=9v	�.rű�J�b����W��қ�Ծ����o�߶%�<L�y/��''��hS�''�xb?u�[��ǖqo�3����>�}]C�� Iz����d$_��Ͻ�kǿzuf�|�4?����i~V�v���j��V�M;��7���)��)�?.���?��.VH�z��^�b"��ܻ�
�t�¯���қ�7�_2R�	6�P\rc��cDG�!����� ��؝��|�����MǍ''�|d�z�T�Vih����I�iX#�J7y{�-Ws䗮j�]�)�&�t�ς*38�G�P~OJE�կ +*N&=�H\ø-cb�5��t�<���[o�f�O�&M��O:�~5Hy���䎅H[f��"��{����^���j
��T+7MP"9���-���*`�ԑ�%�����L?O���!�/��sc;�SŘ��l�<?��2P0��1���!Wv[����^��I�����艱	�&c._��W�_�����~�2���-��Y�]�''V�k;/�z�r��S����z��<�O߃�& н,>n�6��c�)�|MX��Ae���|��"�"�����g�8��m���m(��ݾY����w0r{�t����M�wu}��Ee_� �t>�vc  @ IDATzG�in��?᙭���@ZLB/��w��ʅq��-����a''�o~@l$O��6��$/�i������Z�1]��1�k�v����"�&<7����LZ�ؙ��`5��k�a��]�ò��#+8eO�����Bz)�/�/�9{ΪK�Ō�����~,9P:fl�!#�V9���H�vŷ+�%5z�_�����F既�H�I�_v N��]Y�e�����<�B�/������B�+�H��6��TSM����3����
K��{�5����E%@ax`M���jJ����-:���O	r[�mBS��F^����������/�s�x�]��ɏǽS���=���Nw�m[b�]�䆗�/o�c���ŝ���ǰo�.�%���C��@G P�v[2ɷ�S�V�d��y>��	��"�"��w�Q����x��6(F���YIp_����菮g��N�dR7I�P����Z���b��''��*���u�Z�����7F�C���''�g$N���=����E�B�B��!����)�E�_�H�Ң����LgRi��BY��p+��.�]i��
O�}��M��%���R���ʯ�f��/�H4y���3}S2v���y�%KB~->�<SWO��ʫ	��F�m��矑kQ�L���
<�U�ɽ�b���Bz�
?-���T6�K�!��K�#��ǰ��W0ῢ��_}|�)o���eq�F��_�D1!�ӢW�x-i ��q��w{>�m������8)p$ߋf�/��x)�����Ǘvs�x�Ҿ}n��{�t��`P^�̞[ίw^�=��~�������@����g��ty�*Rh� ''��jI�Z�>#�"��n2�}�S�I᠉�V��h�z�iO-8�Ù}���i�˾���w¤�z��ĸ�{�MnXGO�u�C�2i�µ���^bɝ��ޢ������Tm`Z^�;	䫤��ڜ�^�^�/�����M�dOs��څNg$W	ְz���e$�]͓<�v�)O�����q{��U�*!� �����T����m�Ҙ�<��q���]����F/gH����;Hy�- 0˯z�}�i�W��WG]ҥ�JG�n��ĝ��S)���&8��+�
#�hFe���M��XԮ�)���@��^�K~�%����Sr�2 	m�}��Kb�f�~>-M�H#+�". �ɤ�yÏ�^X��7�d�"�&(m)FY!��\�w@{����drl4_>vz�_��\*Vr�q|i��������U���o������qY������ڮH�[��a�MkK!�
��T�=b��v�N��4ϣn��i5�Ɉ�~E�;٨~�|j[[��@B9˼�7�V!��+�k r�q0�}�1)���3���Ke_�4����fz<kC+e����h_WEO(5���WU��Ͻ]���=�c�M���A�	dM�]N�Ń�:N^zˍy�Ơ�o�E�žIG�"?!CP��b"��\`��	''��(%��:��8��+7��F�E2-<=G��Ƽ�X��J� �- �J%�������3)�V�7��:����1w�1Wa��+���I�SU|�SM��Jd��LrJ˞���)�*�ѐ�S(�٤�e��U%��M�(�iz����~b[c/�c0W����|���`2�s����ۤ�!y�2Um!�ky�M؄Ali�	 좏F�D���H�����H�*�M<pc+*����t�>I�v�p���ӗ�42�?7ޟ�/M$''�33�:Ԗ[�v$�WgS� 3�B]��෢��	�Q�V<���K(#��lD�O������n�9�n�Ge4Ȗ�BF�۽~+�_m���ϵ��$�Fkj�V7}�M�ګ����t��H����M�z�C�VB@�-Mfnt�W��@�x�D�]D��Q,E�Kb^����H��D6�Wt����σ��5p�DE��M�L�W�Ȥ5�wI����7g5�.l�<i)M�ԓ�=M%�r�lS�)�n������g����9�;�o*�V�Q�d�+ѿ�N_[|������ΓfE�~�dmB��^�C5U�4(�Є�0��J�B)��V�|�-���l\���c�k�F�m�:���& D���0�IWω02�$�.=*�N�טE�K�ӏ��uZx����wB.''�k�lv�O��`�y�2�f��+���+W�JJ�ʓ��L�Y���}=���x�''�Y~˚bi���|�_������y�ǥ\!w)�/Or��҆}�m���Hb߲h��`����J��{��һ��~[}1C�@@`�d�WW�)�/�q��_k�-Os��<m��hD��W�s�IK��1���]Pj�!���o��v��i@۫ى6R��Z�ornl�}$�O�%{�c�6� n0��d)&n��o�A�d8��T�?��z�JY��1�?��x)~���ч��a����05j�&Ѝm������.�fBph$/ʅ._7i��&�ˍHB
�DzL�,M���D����e��=����䞬�����q,o�J�E�[rqR�!��sG�6}>�����R!/�O�>	y����b��E���'',)S"��R��h�9U���O��
d褥t��H� �t���ʟf�$���\��B��\T�)�3�0�|�f~Q^�@a��m��S$	_���J�Ǐ�����p&��&���x�{����P��k�t�E��WѷBz�(���m@ ���*�o>�h� �+��3���7�''������\��9��(O''ϝ�8��r����i �7��67yo��.Z�{kDk���s�Rՠw����rn�G^�ދ�l���r����A@����|�|�ȮaG�&2i�Ԯ%��v�	�d#±�m��!_}�R��[�I�f������ٹTe_�|��&m6B��F�o�	�Z���^���`���1<�s�/O�Q�
���-�B����K��S�c��/�&!��ѷ��sa�:ՄN��w����[��%��b�A��L�L*�g���	��E{�-��ֺٗ�
h<��I���ZH� Q=%m˄�RʛfP��ʩ<D�I��R!;4L|��������)W,�S����M��2SR�d�H)`(���&���v�Oy�yZc���L&,@:�J9tke�խ��C�a��, p�?���{Ҭ�dLs@��&��
�i��D�vŷ���CL�ˋ�y�6r��N L	�
����&V|:Y1�d���<�ҳ[0x������,��N�0��}�9�/��<i�;�C ��L�k�\2rnf��S�,D�	��O�.�M�p�������ƙ@�6�5�����o����N�K�cK9.v���W�ފ}7vh��6�L���6}�3��O�ln�֛��6n��WF�Uo}�;�Զ��3;N�Q��e�JSd�''B��w�qV�tC��2�p''�ϲR�?qiAe��dC��4��rƗ����F{E���<Y�Q#�w���hOF�E�t�t,��B�u�g`$ϯ�����N�~�E$������I"g1]3\{"�[E<��/ޒ���HG��xd�I���j�Z�k�لi(}�j���~b���˙��0vͭ''�i��.\�̪��Gl֓j�����uJ����%��<M&`DD��S�
^)X*�W�ia�����j(>S��''�M�iZ�^8���ƀ�l�xD�0ն�a��s�/ɲi�m�E�y�E����4��9���y�A��>u5�m� �鄁_Ư���,_�	?p�PK*0��zJ4�KT@�7,�L�8���E?�����H�� i�a�RյL�+"���	�)�~�@���I�>��v	�ޭ��S����Y�#��O���S���ɝ;wN�|(���N%��s�p�6:�����˓Nql9?��̩o��A�Al0��@�#��jv�����|�u�~f[��Oâ�8=2�˗S��.��T�{��Fٺ����K0s5�������9�R«n��:��e_w�sgw)����wz?i�&��t.?��s��Wc�#E�Dԍ+�t M����''sF��p
a$�{�7?^n��@�y+|�O����+�WN"���LZ�U����H0I�y����:i5ٶB_�?t�P�z�}|ܹ ~����UR�Eu���S��bYY	õ*D�(RZ~2SN$����]aq�I	�C�I6��E0�(�N˒|[:��)��8�`����-�4~�&��0ӵܼ���ji��AS������T2zI�l�@���Ԩ�<׶^''/�W���K!u�BC��d��m���8�_Ճs��d9S�W���.w`�R�_c��mAM������d��~�t[���_k�4#�>�˖���M0a��xy:�MZ�,+���$��d0�=�Wx�|''|r����T.���z6�MN�N�3����xL��09=_�t��{�ؑ|kZĺ:���D�F(���+���r~����y��˅	���@�# 鶬�>+��WC�	�~��7[���kR���s۱Fu[��/,D������-�IJ�p����Ƚ�gv������_�𺆦������{�f#wތF��kRc��u��(ct���:I�8^rPX���/��V���J0����$��)Y�Q����Lp�~�P�֓Y���Ȩ.1��Rf��h�9��o��|{�m3:1N��Rz_O�5��K���SHo����S���^��O���Z	ݵI���W���Пx�g�=���I��ڄ�{ŷ��
�@�	Y���ǌ��(_q_�8I^���_$ڸ=MO�I�Oz�aUA�BkB"5�/�D�*~z�i�]��g8+��oHc[�	=J�"�J��+�I�-��K�^��F�����j���\�LΪ�«����C�
Ei��v�sS��&�ADmez������R/�8�+s!�l[���ϭ�Ȕ�~Ai4�+K�o�r��_�g�<_���PHv�3�p����B������Q\���MNM��޷o�4LMZY*W�v$��3TWV�]h�a��%����=�2�>�}�b�p�7͐��""��4_�l�7�i	��V*���b�z��*�LSC�9�|,OI/��
���3�w=6��¿���L�" �fz�K]�U�*9�I�q��4�&ɨ''��4i�
Y���>-�~��}��@�h�^Hè-DDk���o�`�)Z{.�
���ez�%b62krq^a������)ٴ_s�U� �&�ā�Q
�y^�''I��)*�����Y��ޗ_���3_�d���f%҉�2R��2���Ž�z�r�.�@���''+���[��F;�(c��b�b��2���<I3�DP ���!�B��֧���0U�,=��k�-_��*�L��	
��g�s#�xbTA)���/7$\*������ʻ�қ�Jf�5�E��^��-5V����.(�{�
���ű�)�m�4��=�╧K��|U''M~�FΩ;��y��mn��(PoK�i�LbO�_�f�>��ɶD��	^`B�̶�j�r�`���Ғz?Fu�r!��u��t�N2YfZ�6wnl�r���LOoar�\��R�r�ע Pӏ���`Z��
x,�G\��Oa���L@  ���!_J�+�o��oo&|������0�rh���|��N6�k��Z˩�2a�¾s0�v,�X:�P��D�@?�9�աr����"�L�?��Qcfx�.<�7
#7�X":>��IrW8~����ڇ��`�ڗ5''ܻ��ɤ����n����{�$�}�W�=�}������n{����  y �#H�H��d�i#(�8DB!&C&E[a�E�?~�Ï������-S��C|JA����ٽ}���g�U�~~��]��=�����]�9S]U��ofU�7���Y�[Ru��V���S�b���=���d�+��.����kK�ր�!��{�����Qh�G� �gq�6���8��8�%c�����Y��F펓�\�SQ�����@������I�}8 y<����}�M;���tF��`M�K,�f�.���ǩ���!�2����ޡg{�ϊ����Ƚ�z�����Q�K��u/F��� �x�;�y�/��y3� "��6�ܙ���Q-};��s�ʻH6qˎ� #�ʉ�j7l�gs�IM~����!+�n���4�`�����K�)*/"�QC���=�6;$�򫘒�G���K}W� ���Wyr ��������k���Z�]�e٭��FZnl�T��O,�؉�@��V�∰?�OY���z?��t��V4���"$��/� �o��t�:m�G��,��cƀ&L]@��V��{ �_(''�NK��w�\��=PfHt�x�`҇�o�Q?HDǑ:=��<�$FQ���G��7�''W��� @?b�#�g��|L�F4OX2>�5�q��H�1b���Mm	�J�z�����J���i2,�)�F�cq"���~�0Ҍ7O� M��p�u����f�2jy��(	(��w�kBY����i
=�NJ�r�$�d�����[<h#4ɸ���6l(���@��>�ȹ�/e#I"�LB
��$q3 u#/��, �B�z ]��!�
�7� +2��F''�Vj~tu�g9���!���ДH}Xi_�-<�F�#�J�Iб6��C��^eS�U�m��>�jX6`��c�
�$��c��#��d������0$)X��	�i��Oy�?DZv.�0�؃�0���^s�ͻ�''~K���J���w���Ro�hp@�S97�lVk�l͝l����Fygg���
��$�$�*�y�S)�R�y���?!���8��O��D���������O������b+��\tRpť.!�gD��/�l_7�+f~�@�9߾�H�˸��h��H������xoF�=�;VG6��b�#��lLȀσ�c�H�x���D��8u�+�H���C���su
�a��{�Z�Ris0�w��A.��cǽ��E�� ���W��:Q���''��H�I���;�$��VA���W�]α��j @6�ǥe�$!ע܊Og�o.�~a�����X�ݑ{r����*�H5DV�o���JӐ
�|K_�ؔ?b?mP�U����{�\�>m%`4Yi��΀���Õ���>��:7Cs�R���8i������W��8����
n����w���%E%?nA>�4�#��⏺������@F�I7�#���D���Y�`]��]֑�+��
 5-ЧXi��F��?�9c1Y�t/w�=e3��_^��nl,����vr���	���T�s�K�*^�zy<�)?���4����[��D"y�O�!����o���k:;�$�����EYTC��.��>���(Ȥ��p�:s�}4��@�~.����B��v1r�?tR���ڼ�����E�ؑ�L*�K?�`�U;έ�g�;4-�K�Bhx/�w�X!T)�bR���Hk��OO|��l�6���@n&���9�CeCJM���%ˇ<9�BC�ɵϐ�Z-�1ڐkC44�O�C����8���w{��L.?�π��т�j=�WN4��+?� K:a���� 2l�CX2 �%��|��
�;������b��z^�@����?J9�ѱ_¢�nN
!��~�:"%}t�)�9�(1�A�Fb�3!k9����-��Op���j;i<�؛Q���듨��}Xۀ���0�@�u��R芽��_W''MW�uu���W�	r�8����y5��C ���?-����%�5�<��j��/�+C3�䫔U+��u���N����֮o\�pa����H�{E��}�ߘ�vw�N�͜L�]��D"! ��H>��VW�X�ם�eS�_էW��@�sS�Ƿ G�+�s�j[0�z����v�p��u~�b� ��w����''�{�a�I�z���[�\)��8)=�z1G''���.�� �76��������@�<�N{�{���ښC6���H�>D��{�|���:Q�&�W�:�J�T�ն��	�g��� O���@���rmF��4L3�(��jR� !��H>)O��bS�FlM+�/�gaɿ�F�L�}Ԋө�+q��lF�W"d%j�MDڹX!���i7(m���=�
�!�V0PV��i��6�!���������bt�X#�fFA\�	�[�^E4���0��-ԭ�dˇ�''�`j�.9�Y>�+�ŐI2�''1���|ߍ=��F�}i�L#�w��?E��@�]br���qߴ�>=�.��Y�<�r��F,�N��ne��z!�0W�*0��^��Z-_Z���V���j��Xk���7��՗^:�^��L!��F��''�T����T���;��"��" ��� �e���o�Z��7L�)~h��mH>R��/׉/��0�� 5���^;�[����+�������X��n�� AB��l�y]Xߛ���4_��mxc�.�wX	?Ea�F���Q��L#qv��5�2���u�e#����ۮk��E2,�v�_b�Td]^���\�r�k谭��4ȇ%O[s�}87��`>������ܐ3r�+�a��9�N���kˋ�Q g��ەʅ=�>`!� ���@�m7aA\�U�P�w�o�����Q�.�V��,���$R�Iqڹ�	�=LN?��- ڒ�;��/ׯ}�U�Έ:��dL͟Xȳ{>�ȴ��i]�X���@����U�.�����6v�Vևpk�z��9Wx[Ь]�6�����#�g����/���Ș��Tަ�ê�BÌ�F�\����5t�:S��ͦ��ΞI��^]#�q�THb?(p�;����77;k`H���ӏD
� mi�%(v�
$��p$�trڷӃ�B�)�4�(��Z?�23G��ǋ��2�/u�%�u�=f#T&���k��^�=��?�F�8�Vt�P�8�w1"8o�Z�_B�)�x.E� �ĥ
�:6"����''���ڃ|+�eW���A.dr�[6���ʳK�{�d�''��X.�V�D���i��)2�	&[�B�ūtT��Q����|��o��d�4f�~ �Pe?0ʟ����7��	wY�J��� 7���@���S��T��[����OHP��ڪ�!��#ܞO[&��H=�ȏW��V���3NK��`�._��tC���r"�D�����.��ܤ����-�`d�19�ӕw�""ָS`+��� �]�X���c3�½�g�4��̖ʫ;"��O�^H��k4�E%�Vi��p�������^ZZ��H��o�1"8^����!�����I��b�}�mh�N��D��DD�|�� ��.`޴��p{C��gcl��Rm]�N���ζɎݽ��� ��ԁIh�5<�)�uU�Y˻Շ�ύ�3$ �3�
�UlFh[-�H.��K��3����]?�M3ԕ)I�ȸ��ן4(ɯŸ-})�G=֤OnD��E���ť��b���5s$/JM�</FҮd}F�/w�$ȗ�Du���W<^�l>9�����K�B���YY��&F3�	|e P�eN��F>\y�=��k�D�9���Uy�m���K$ln@B�n}+����d��8��Nq[���$��3�oa�׏pPT��OqiI@�ݑpraD�2�s����+.�_s�A]e~�HE�)�46���j�Q^i���.]����/T�E8����c��h�����:~Q�caK�N�FU�N�D��@D`X@v90|����^E_l��t�(������ ��1Q�?5U=��v�=�{1��#qUg�J����@���Y�]-�禄-�:^r����t]��������zǚ��#�oI�y��B,��xȕ�q2���aV-՝U��D�C..��a}�K�A>xӓ��%�����V�ݵv!/ֈlҀ��+�''���i�ŅϴV�N�	�.��ޤ�dֈ96d3H�*�����:y�2����X�F�U���q
�o~lP�s��''�JȀ�}|h@���d�ϙ��j;K�q����j���C̙P/�7|l��$y��Hx��؀D���3+)���3�a��ܕ���pK�$�y�_Fނ���E-�W��5�Q�ղ�J�XX9{ba�7�_��''?I2cg"��*ѳ�e�Wu�;dIs���sT��I��DF� _����X|�ߒ��(3CH��
�t�����:��! N��ߖ��!X�?�����ܲ^M/
ߣ޷����@����Q''^�B���޸��C:''�~��-�F�b����@E nXn1Q��n�8M��!�VIP�U�3��ӹ�_�+����ϯ�E�=��ql �b�l��%?�v���&����Y����r,�4E,�MSR�B�>�}"�� ��;��Ra�g� Q:{��@M�{�+`�HY�+Sx!m���OȜQtFF��ۆ��9����_�3  ����xyN�� Х�s��I�R/P8�$dǒ�1��㎑#�Zv�*r�֪���ʛ��6����T9��3��o''[�[5�ʁ?-ȧ�-������ɸ��jjd;����R���7�8�r�|��1�V�;E2FvE%�����̊����:��i�/*��j`I$��h���@D��wA_���|}�Q�������@ҥL;����eՁ$T�H�Q�RK��N�-�������Ko�N��Կ��s	�W���?�qR���t~cxG玊��S��T7��E�2�F����P@�妊_7i�U=�r#��"B*�	Qw͂8e''g���%I��4��ϑ{%��\��{��I�����������ם��!�M�giY9��B*���N���Ab ��]�Wrʿrd�Q6P#���!i��·
4����*�� ��2 \ɿ̊
��P���o2�������a0�$�uI�Qn%�ⳅ�\��²�i�?��m{��S(�(�g�/��gQe�j�Y9��u6
 �/eNE�(8�)�yo��?7�)��/E�����zV�Wk�+��W{���3i�g~�MQ���W�^?��_��7t�Y�5�$�����*�D"� D�]��ԣK5醎Rs;=�}H~��?��u�i/���:���w*nJ�/t������^��	Kg�׋؁�`���>�\�;���[�?-�\������Jna�jD���$Ď:I�U"O�H�Z�{��� ���Vy�H� \�D��Fw
����[djV��}�"�D�%M_#kd�x,]�^���c��z��-��)�O �&����+NkVʣx�|\Hͥ/���P��`%�ѻE���)�� "eʕ��9MV��G�%���G����ᙔ��snC����z���1��͋����Ƹr�� �B�2$<[���ª�.�jK�yV��<�y�=[�BOFs�����z����z2���*�{s3�r=���''�U�!�>\1N�؏���8�$Z�O�X�/�H��C''�E�� � ��$^�f9���|H�Qq��uy&���8��������&�xǚ�nR�����f.&~d$��A6�7*ށ�5�&�׊��Ŭ''+��7Hk�̌�+������R��Qz3�B�=���mz}����"��H���v�6���S���6 ��pJ�A��ntѼ�>ۂx6��8�V-��K�]f$1�Z�F�Qg�� ߦT]і(���u���u?qZhO���2���^){Gy3��25���bi��ɑI��l�ީ��DQ�''ʦ��x�s��t�ˌ�Ւus��&�J�2��<l�"z�3~�<��Qq�rs*�Wt��[Al����|-����~��M�QRr
鲪�T�%~����$���#R{�w���L9]�̖��l���Ϟ]�Њ��W�$�4�q�6����q?���A�c�<���-.���h�X�GL�(�D�/Xp�гm��r���I>d?߅p����+�)��)��T�i�No���F>b�GG "����si=��&A���DF�7�92gD��#��w(�~�h+�j�,�mհ����NV�[�A�5��"}b��w��C5Rjֵ�@ZM��/���BС��z�+qbt�dtҟs�+cDפ��9 ���u��<{�&���x�Ͽ#%E���˅_Yڠ�''�*����� D/cY�B	�(��ڋ�+�ץ�>aځ�aA�G��r�׊Z8�����p�5KD�$�6 `�,���P�0p��{`��K�{}�,,y��+_��Lki;7�Ṙ"D���6� �6�~S���|Y�"��oɪ@�md@y�-ͬ��˕������r�܉�oK�my�jSHb?n5�����_��t�y�6���Q�W����x#Љ��sL�!ŭE$������[��9M�o���&���I>5��7��������{�?�H�v��!�N	�1��_�`)~)`�=\���M�X����Ͻ�A���m��W���U�^�T���k�F}�Ĳ�:d����j�''Jx��J���j%_�"���F_FQ8)=ėYY��t���XK�p
(-���Mɿ��
C�,''cbk~�5������%7����BP`O�6��3Z�(I''����$b�PV��-RO�zH8gI��L�{#�nЃX�ǼHŝ	o(���( ��~�;��V�''՞=W��+�[4LP�%]�''H=�ۜw+!�e�N
r��!m��X��TT�IJ3��sY�-7�t�GO/�I�1�v
I�y���8��޿C�~N��~75|����hF���B� B�-�y�H�7�Q�tc�|�E�gH>D�^���T��BQ�P�e4�v��Mɹ���t�lXL��@Uƴ�QV�!$Ѩ�8�_=RF��}D.x�Cz�_'':gѯ#�1<������@Zș0��S��,wK���� k��zѦ��#�gdV.VI�=����l���eK+��A�n��$�!M�H&A�h�$��{�s��A��|s���c�~`����	&���F�to�^>5ڠ�����In�>�D�6ep낕F\f���Ԏ�C�pT��+ v�I�U�V�^^17I�������Qgs#KC���2	h���''�C�J��O�� %��>��|�!ii:lC&]�~�=˙�G�M6Ǿ<�UKi���\jT�KsY����g������B�}�;''��w(!���D�	�G�*~���p��E�_B�)�􁋺�:����ln�znL��;���2�7X�A�I��q����Irrθ@���������''~��3�eIυ����a��''��a��>�������8�.�u���"�~�`�2s5g/o����ʤ�pe�7��,�$֪&���7��E�	e��0���^>5R��z��A�F�"��{�����Q��9D� ��\]�Q~]�bX.��Z���8+ݨ������"�S3} �F�m�A��y����5V� v»o�i�3���ݼ,���k
"d��ͼ� .12����yAb�гڴ���BJ�#ܠ�H=r{T��(�%S�W	Jɺ������F��t��|��#6����/����\�p"�_O~Nǧt	ۨ���h�P ��RC
=C�$��zs�v>���<�tGgs>%HY���A�ƺe��Ȑ�)� ͐ ��hEyΞH�xV+�lU��H���;��T� ���ܤ�(��^":���JPP�*��.H��a�w\F��>D������5Y��*#��#Jvpp���,���_��1a�dA�!�AWiVo&�p�(���?��Н�d%Ɖ�~���<iƛU����¨�K�4��E�5�Q�+��s��ҒZ�Ŭ�d@ ��A����*���w��9��M2.���ʪ�4���qa9[�Eg�7��DL�$$[���@��a9ۀ�]��z0-7
A~GE��%��$���|+5�#�Z�)��i��.�Jե�v����４��`͠8�tfxdF}r�O��Y�"�n{�WQ�8"�G`؄�[	��>+���)��n��.�����a7X&~i~���zG����(�3	꽠� ��i2''f��;P_��C��oi�pd���{�d�����V��ɑ�9�So#r�<
b܋׉y3��Ꮔ_�\
X��?e~�p�1Ս�l%�z�Q��G$��ʡIla�
OܐQ�: ���j5Kːmj����	8v����b�4�[{0�+w~�!KWG~�c/����#)7w�5�$��<*}��x0k����?e2��cRx��M��CYI�����T�#�ާi4F-Ou���U�)��cg�iH��Px?�\U�ԃ��)!�Nx�k�=D.^�6S��h�;�H�n:�ܙ�I�>��}l-���y���=q�E³��u�v��G��F�gff��t��cЈ@D`�B?����ynw���k����Q&h�쒠�����1�i��zW��k�x��k�Ͻ�tb�^�Ό�#�G}Z����G�!���Is�t�Ĉ�Ggx��d����FW!�������* ��LuX$5`�%�n���@�B��(&���F������''�T�u��E 7����s,�ʆ��d��K�yrT9���k��CW�7	�m�cYc�1�`��)��''��Z�]^aV\
�$���0\~Hi���" uO��G4����9@bO:a�~�"Æ8l�:V�w��ՀV�纙���b���{7!my�ƳReD�#<�����foK?�N��ݩ��n?��^��8�ľO��TDAY��>��7X7U�(����8V�
�r?���yv���7ޤ�:C�&� 	b+�i�NoK�՜r���zZ�-��zG��g�H>m~��vC��g��B��YH�w�׻ȫ�37����`RT)ZFz�O�W���/�e2R�� 5
��h�X��~0�Y�B�<:�ș�뽓-��Oi �H�=e>�h�����A��b��G��Ùu$�.t�w��v<�V�~ �y^	jF��] ��^�Ю���d�3�.�MA�2����x��%�^b��P���k	�����"1�,��^A��x�}^��BS��d�a''5�#�S����<�z�\˨
x>�����j�ݩ%�;3k�zᅴb��X!PHb�4�����(�����ha
��y\8�*�."p��;����y�	�j�C{�v���)�Ȟ�H��/ߕt��ۜr������w8�wUsS�?)55�k��d��fA*��Ke��aT�Q׿!����"�V�6�����Ѕq4c��rJ��hAuv1���H�)
=�`�̕Ǡ$o�j�Ps7k{;�˄s���H(��v�uM�p]���_�̾טAP��s����]^l�8�9� ��reU�,M�X��!n,�Ag�oj�F�iO޴4ȋ�w����sT�&�w��kˋ�Q g��ە�7j������� `X�̭*Oyܴ�"v��w�w���f���)$�<gY9����r�q[=��9}W�:��X#PHb?�E�/*�_��7t��w)��Y�D���kD� ��IC''�(���`wذd��TW_�yU4�汛�~ꎶ���D�:{a���Gk�L�~90A�π��J#��V�d}�ca������n|u''s$_D��T���hх��0�"RVU1��YPˇ�qMsPyͻ��O?8�hK�ؚ[�B��!��^�+Dp�^����1S��''\��B�Kfu,�t�J��Cu"�v7x������J7�>�O�F9�-ݏ]�w���O~C�\��V�ߴ� _YL��x�KT�,*����QJn �uB�ȕ�z�O_�2�r*����U|�ߌK�,.Y���л%f;)�oϟ���ԃgW,��3�Db@��E�bx?��''u�H��M$�C�8&8E"����T�qG�\$�S�I�SqlA:��@�������i~�AO ���Fc�;ԹW�G5��uNg��z-Y��j4���4�_�\ϜcpR���ߔD����<�fT�F��f�6�fߺƝ2a�⡳�d�voAcx�3��1u���c^9W�.�5�#S����qby����(�
X���ȗ�\"ȱz��4�-*Kך�KS��M3�-s2:��m�=Y�& �2|�&q97{��>�1�yp��n�@+�{	�2�1z�T�%�&�x"nS�k�H��.�t
L�7�Y
�� ��-f. y�K�B吽wZR&n��V}f������g�I�q&8ݦ�Ğ�HFO96��  @ IDAT��"��:>�C��Fg�ͯ''Qt�S�tB�9�,Fg_�N
hG7�B�U6z[A

1>��v�B�́�w������L����U�!�bN>�:7�����>[�]Y��~�����4�(u}T����CXeC��$�$�j�P�����B�>�@�4���5�����\b��GKf�@g�e�,����9鳾#�ްT�j	w���þ�R<n@��Ȝ}�3�(�zju���q�,ǅ]t�[��5�_3��!ب����`�\5Y����;�4 o�J~|2�Ȏ��3�iS ݛ��o�T�m�;� �y�A.�TAR�U�2$�B�aB���y�m�# n+׷���RV����=t���֩�f*(*�?R��������u<}���%�}�EF� �l!�,���W������|��j�N�G�[r�^�?�_��`���ic�8u�3́1�N��u�!�;�u�G�����@�q�����:���$Y��>s�����"�Ձ�C��#�KՉ�W��}̞*v��$���y�����e�k���z���|;B�n�d���k���N���ʾ�-q����@�a܄vƳu��C�N~�[����}�h9�}����dӔL�!��F�>gc���3m.�����ʕ��{�^L=�ʛ,]�<�I�zK�75�~�]O<������H�su���˺e���G~���>αyu�#{�%��W;��a�=���ʷ�D�[����d�H��	�@���d�H��''p�6Fsn����Fcu�����L��5���ě��oN���i��?-���DkG*��|��kI��0k�T�$���*s�`#��y���M�i�5u���S��T7�x���nBvs��B�m@g#Ѯ���#�7�+l��+|�S�Л�P�2x�TĨ������{%�S��#[�����enB���Y.C:�=� ��@�.+7���:X_6(�7��Sc��+9�_9��(ڨL��h�h)�U�7ffK7J�����ڍ�/^�P[4��Db/<�*xF�����9��n{���K�x2S�D:"�����"��rtZ8K#�"-p)I�����tT�A���l�YT�Cy�n7��t��y��;�q�:�7x���6v�4�~P��M�(�礲��3���}W*��Gm����GI�簪
��&Q�&���d�v�;�O$r��a�F
�]1��sRi�)�]�]�*��}��ʚ����Z���$_rr�<��~�:*��6�3�N�.Fm����֏�2�%�O�5ˏB+��v%b��
 �A �m��S��=ĭ��ݤ��).҆q~H���]|��+~�s��˲[�VC��ߘ/5n\���W^aI�h"#PTb��ʯ��C��s:~Bs���t#�QZ?�3��@����u @�~���P�<I����\��շ��Zy�k]���z��C~;�P��]�j�t,�uH~/�]S����m��E��s�;{�49R*�:�8I6*~�}I����Տ��#�j�0B���!w�Jr�@���m����ot�Lِ�#�~ںT<B��*-(�[#��IL�O1\&�C�]��ȯ���S�r�� ��S����Dc�ـ�;鿽Ǽ/��5p�v��-3d�&�6� ��S@�G?ʓ�9I;� ��l���G�dM@�H�3�gD�K���>v��� �?�D�@Q���(�eu�O��Y�z?6�1�Z���\$�cSM1#��h���t��=ESOAe?O�48t�&��{��S��y���uMw����*�9P#I��n��h�6����T��"�W�z_-BC�򐞚K��K]��*0P�G�[$�k�t	:k Dݸ��QdK,�u��3�������â�����/<��hI�!�"������ܿ�MZ�9匴�q;�-Rl�����7�6��[����Aou���l�*�� ��@��������KR���Ͽx=)ɿ˗/~ei��Y�Qo�Q�ϒ�iR�>3S��U޸�҅z:����"�z
ydT�/�x�`�Ll�ͯ�+��KD�h�y��U�^$~Ǖ�a�K�(�DD$�0/���I7!/٥~)/;�"��@�ơ�� ɧP��������u~�Y����ɲ����YKV��_�}G�f��L8`?˚	̼|�[ek�!G� Q�Iׯ�6��ؖu ue�{�䄮��|�������qc65w	�Eڝ���"�r&97�B%x"�%j�b�
�>��^Q��}T��oV��Տq��`���/#T�I����꟨�n3k)A	����jE^0h@:.�>d;*�R�|-���ˍ�����_%����*� 05�^���O�{q���D75|"���a�#c� �Ź80��C�
,�s���B��Wi�|�b��>���''H>uM�''�P�0P�h�u���S�i3<���9Ic�y��=�b�w7D���ɽm"�k;�Dx/�8����>�s����ʾ''�wD�����Qn�zclj�&l���!����w�őLG� @/\���%��g�w�+o�f���[*L�_Y�o�E�o=6�1$���ȷ����_��P�9	sٱ�-������V.XУhn�I�I�J�5L`���\�j��3�d��ب�\���^Ng���׶ҝ�/����\�d-���H($���n/ ��{�=:�����~��~�>J�ǽ�b�"�#�.����?m�|:��u�5_���|�!)C~>�g�5;^;���x��2%��Cp���8����Oϕ�x�l�VW�G���m�8VD�W��dg�w�@''����\�<y���T����$�߯��lR_u-��0#oN_��q3�Ɛ���o0=��6UZ��x\/���tm%{80R說6 ����Q�+�r�Y/CS�''�ݭ]���	e�''W��3z�+w"�Խ����ր\�I�E��~���xt��#��I��Q����ZVO�-�o����j��D���e��u�܈Уj�:~L�{4���#�O?J쇏L!"0�^���:��\�>��P��
��-I������H��t���-�^�%��S�z�E�vq`#>���FAΟ*ۑ�Q�
��dy�!�/�/�>�}�$y�v=�����;(̲Vه�!�̲4z5嬮q1G�"B=:t�����⮘ݿ��@A3�U���Y�d���A�b�T���F	���G:�	*�ojN#.PlU�՛������(J	�;i)�u]2jcq"���%�U��[�[�8\�+j+7��~�����V+���>r��4=�}�w4��($�?w�ܿ����ɛ(���>���ʘو�@���G�/����(�{*��nJ�E��r\�t�]��ha@�>w���@�R��h��f����?�@+� �_F�/)�����+�;��s3ɥ�z���q�V��\!vu�M,���6B)K����^Zo\މj�
���^>c����_�n�Ā5U|}?��z�P��S=�Q��@��WHխ�a�
O�^��T�M�Q�,-������l��^�����v��k<`SZo*���rr�Tή��?~��g>�	�(����!PHb???��I����n���rY��h"��F���zs�z(���S��Ӵ�K՛����5�����q,�	��D�My�/���:��\�:V;�*���}S�ɷ��:3��KZs`K�|"w�w�g�z�w-鼰�s�zH��9և�Xw�k�~�� ?�b��v��$�b��Q`mzFTT�T��h	��Q�82Oe�af�S?����O���:��٤�4%��8	P׹Q�һ�${S�ҿ)��:�|��4�#��@�($���*ꦊ��Or�Ƽ�
�!�$�*��HG�LX�˯�e�@�I�O_���� ��[�Ѧ���"u�]P���m��hzC����s\�I�@��ʿ�U3�?Ns��%�cN��:��@�TL^�:kJ�x zߦ�-�����l|�Ŀ�Ohh?0��� Tu@���fuyso�0,K�2�g�3R{w���r�M���o��j�$��Xk0ލ&�5�۸����(�+՝���o>��3�MD��Db?fU���
�ٙ����/b ��;Wd����������:�[���>�<t� ��iEi�)� ��܀���Q�e��i|��|2(Ԛ�?ی�ꗤ�o�U~��Q��߮f�]6̊vk,�o��wx� �Gpϳn�1�w��S�/�P���Ʀ]�8~��*����1�AIR���yr�ۊ��kɾ{E���kx{�qx��z/H�����Z����j}3�foΗ�W���n8��%"S��D{=�ϼ�꫅�,����d�ľ*�n��D���8)`Q_˗7�Nў�ځ�O�4�苷}zF��8�e���;�kV�?���o=��
20�}K���m�l�>/����Zݮ�nN�|�@$P��P,`�T�F�$�a �1�Ƽ��c���GK��`�:>�#7�����ݱװ�*�I�	l��YxW?����,��+Y�|���x�/\\r��7"����f��za�W�~Nǧ�8�}g���z"���kX@"�݊$�E]|�[���q`��Ϲ�x��\�_ʹk�6�a��6�^\�L~zF���2���"kdW;D��dَ|6�����,���}��3�~���,|�"B_�&� �O�����f���跮q''M<�<�H��{��A�''L�f՛�^g�6�]�k��w�b��Բz��&�_N�˥�����W�|R{&D���D{zV������q�A��T�n��)O$��Z�1߃D�_B�)�[:�E^|�S����޾�:�p��I�;����,����\�EСL�42(w������<��>s�!���#�_�u����4�_����.c��gU��6^W
F(�1�o�aG u�����匐Y�-�&�^��A����,���S�Nb� _im�|9I˗kY��B�v�һ.\�d��&�)�h"��kb/B�Os�:~Q�[{.Մz�ObU�''�Rc�� dS�#���-z E_|��Ȼn�[��������v���i�����؊D�U�8��A9&��s̳��� ��킭�0.�d��S������-��˚��t��;��5�l^�w#�~�<�@��K��4�p��TB^u�&6���L�~T�J��_;;�����dW�z��v�z��w^�c~�OD "00Ɩ؋��J�^�/��c�~�>J�Ǽ�b�����	}�LO��/��=���W��ǴH��b� �RD�os@GBt(S''i>Z��h�� �}�ߐ�����>�˜=Uz\�pk�z����n�x�G-a�̳DR����%''�&��G�/˴rBzUo��R�|�Zk\�}��K/_L� >��@D`������V�����{7U|V����? c�
� �B$��.ɛfr 	�`/u�BP''�|�M4V�V�� F�U���n���u�Q=S�<��n�5L֥��E7&�|��-��__�I%�E�|`v����l�|%M�{fn��ֳ���X�gWD�U�4^��kT���N?�K\��>�J������''�64ZrY�.r�Z���ӫ�����D"ǁ�ذE�R�* ~AǏ�9u��/kлK�ZK��̊����їj��a\lƉ�wB��_�_�T�`��Z�!���	$�(�r�~��cZ}���ss@G6�#���Qc@�&�r��^�vz�(�?|e2���JU��Pf�-s�D9yP[�Ҝ?�$�?\J*�z��7D+�dn~���BY�L���o�L�����VeJ�hqy�s�"z\�f�WVjwdϐ}������+�NR*��7-j�����x�#�Y�1��@D��;�����~Z�O�`���5�T��dJ������ֶ[b��藵K�h"�����nhN��k��Λ�H��=��
�S�6�#l���Ac#,���������W ��I>�h�#����k���Z]�>ƃ;z~����_�?5�$ω�?$b�7RH��߿�,g����z�>�ܙ���d�������D������ތ-��>��ߗ������F]��_W�r1�ʗ�`\�H�K�=�l8X�oD "0���˒�V�������8�4���={6Y^^6�O�L��il�W�cT�R�������i%�棺��fW�f$�""0�$a�>�X���L��AQ_��I%�c�GB�_��r�an�] �\�4��PaXpr� ��8��j
[d��jM�;��o����3ɝ����pyǹR���*Ȃ��4)ի��"Aǜ�N����;SnQ=y��I�-�x�Z7��\|��I�������6�RvY�-f��g��b��_y%�MD "0�����/�xfAV�/\��<��#���Z����SC��R����D_}u �|w��&����w*�N�6�r��@�=я*��x>.�D�;a�cT�qG�R`�@�¢�N���Ǒ�EB?�V����uB�mS4
0XgeR�����+k �Ӫ݁�=j�^r�0H��!��O.��?�`��:&i]�4Ӵ�m)�ϤiC���OD_(ދ�Ӎr�����RA"��l0��!r]Mpx{I��o,���s������͎XFˈ@D`b)��K��B�s:^�XĆ�qH������0U�5դZ�J�%q���!>U��g>U|�R����RV%H�''�H��!�x��c1:��2*�[@�N�p��_$��{��&y;=���D�3�r �<ϔ��fM[�]��x[Rw�ǜ����)M|��] |N���|���q��6���R�H��}ް��وݶ�����wR{'' ��;��bb����N�p���ϗU%����2|�Zm\�Ϥ�^y�-~�B�x���{�ӧ�/��D� vy �ss�v�VCy#��}���I�f�Rx��dL�T�:wk��}��w>h}?����*��x8�Ng�h껽��$�[S(�MՉ�!�͍[�
gO�x�A�h{q�� �''07��[�1�=���.$�㉄2t�1�2I��J���Ւ��ϑ��lO�~F3��B)y���(�4���k�,���Ҽ6����y��7I���h����/��v�;R��Ce�����e+�W�Z�.��SI�*_y�T_�h"�iD`��^���@�9�����h�� ���y;���U�j��W�l�=� ���H���x}�4�>��vK�N���T_��eD_�6���G�$�j�����wݩA�2q�%����j��Q���2�?b	�oP�ܼ�XFB�J@h�v���=������[E�~S�^�u�{ڏ��� R��O�$�ֻI����<�5��u9�JZj��隷������Š�/q����ƺE&�����H�2Q=I���"����/�~,@�
��Qxiܓ�墤9���⼮���C7ɇ2MD "0�B��XP���:�XJ�g(@�9�8^�>������1_�&���H����:`�q��۪�ʝs![�O�E��
���� ��${M��#�1)�!8�$��]�y�� i�D��-��Ѧ��E��Ii��|6tTG���x��s�Qy��vm�rn�$uR�eohQ�;�u�� �o�g�7��I�jk � jͣ�/�(�+Zz6��A�^��y�}''������	�#/��������K�3�b#-]��g߲�_�[D " ��{�y�����B�EьH<{�s`P�w����Y��p�;6-{g�O_:��r��� �R�g������M��D�@��3:H�8��������+D�1 ���`�mA��^�B$���*lGi����[d�}L�}�M���`k=��=.�#��D�Y鞁�a�Ss��-����6y�Y��,��"�Dp�e}�Pc!P�a���xy��K�ik&��+z�BHg��;)���Ox�A�y�� �gErE�KJo1�KoT�\��/�K4��@D���؋4~D�����:1�P�t�����ZO�.u���$������_3g��8>u��iz18 q�����K? I+�g��C���~T�wX���#�I�[$��� T�w�G�H�''���01N�����(�����[�2uɁ1i�H~���l''�μ�Op�Y$�v~��F=���� >����:��Hr~@���W������}�t̹vq�x��ht�{0F�I_= o$�p}�E.���G	�U�W��zH��9-&ە˿�-o|F3-#��@�؋轨tٺ�}����6���
g9���yX��ع�>A��ʾl!�X8k�[����[#�"����1E���V��,���C4���_t���_��^�У�\���''�0/��Nr�i���|[���x�4_�;��S�|VL��O������LYF����J��G���tD�2�9YN>��}R��%7W+��ͺ;�@�6f�}����ɴ�}�����p�Ȁ�J+B��W?''�;ԫ�$�I�{	χI��]o4��3�43�.���/~䥧VFoL&"�b�&�z�=&��s?���#���bi$��t4�X3_��.x����~���!��\�Ğ0 ʧ����NU�<�8ʯꃕ�넧N�g���~��T��@`Q����_�]W��隆E�4�Ԥ_��{pI�����K9�Pϝ�������q/@�먙�w�l��_�WM�m��26 /�J�Pk_0��"�pf6��=��Y��@5�-��Vɔ3�Q�`��~���GN��~�B�b��ȭ[#�z0������6��Ro^+�E����������䨹���ۗ��3Ϡ�MD "9�&�"��)�?��t�����c	BP����<�9�H��:�+��Tf4M�dvv�,��|�''u��q��r��߽&��.|�ep�Zg!�''ac�=��޳A���G��@G�������i��wS���#��2"0a4�6�o�}��s���!l��hkL��ץrO�Q��
2;�&''g%P���ޔ钝���-�,ݷP��^i����J�z=��v`��Br��S�?(e�]-�I�Q��U����Pʢ����������-4�$˿��vY!�Cp��y>���r���@D`��L�E����:~^�CC�ՠ"׫Xۡ(6���wwiid�7\L]�AeaR�d���%s� ����3O_��	�9X[��[��o~��I�w7-�����g��Kː�Ⱦ�j�h"� P�Ÿz� ?<~�l���v�%��vi~����2ｦ��7��Ѐg����̡g.=��Q�᧥V���~F9��\�}y���Co����@ �]�{�1�/�V.��~�D�zOIk�=� �~o��y�["�~�Z�~�;PD�0���Eu=.iC��lg��w����a��F"��@��؁F����C/��0w��I8�����ӧ�s�ϻ��̡�"ڻ\�u�H��z�n)ȧ9�צ�o�|���"�mh�U�	�:|F�W�C��/�Z�;E<�,3��$�"����:�hzE���q�Z��?�P��1�&"PT ���Q���c�u6(�-���k���>�hI�yI�2�6k_]��Ί^?��wQ�X� �0W޺�P��s���7�g��=���}�u�j=q!�i����/''��e�
.fiu�v�z��W�dVS4��@D`����+B���s:�c\K����T*ng�/�Ww����@�iW�E�j7�4鬂#���̫�k�U���M݉��>�!�7i �	�o��Mλ��7��Ţ�Y�DP\D�gq>�&�\�jx�Q׷NA�w�/qgW�!b�� ��-�9p��L��#�!�Ja�n���xUi���������ofD��z}��!��B##�y��T��a���=Q~���_P)�{�;��Z,o]�z�-6���\yf��O?xM���G�9���@D`����1{J��%?4���;�eX��k��{g���ᛗC�Kg��l�t
������d���9O�q���>��a\�=V�o��nd���=էaٌʹ�jg�����ӄ��B U�@�Vɇ�3/I`4��"����䇱�"���F-Yւt�0�6?''B/������Y���RoM���o�����˕]�0��k<�P����������� ���b��a�K�.�j{��_���*�5"�L>��lz�S����O�8�e;I�d?}�M�A7ش@�k��.��c�������=A ��+��Ya�.�~ML�0��Sv�[8�j�3L��;�\=��^�Zx��´{��!@�,��Z�T,ύI�{���O1LD`��/�Ϩ�=�!��a�~{����N�mz��9L��Y�''׵Z>恅t��}�-��k�S]�Ų��Z�n���}��/n&��7"��@"[,��wt�]�z�N2�LVk�K��p����4x�kc�PP�[̞9�\0�9"M� ؟�r�&��0�߶�c�O����b�ЂY�̯����zF�΅V�؄,���sO���[I~G}(S����i�%����J�yv������_<&]�g��^
�ɂ�L�~u;�����L?{�ߖrs��~�������+�\����W?���[޿ߌ�p��@D`D@q��j�������.����3���X�tD9q2�x����7�g{^=g	I�c��߸�n;���:���
�BNs�{���=/��p4��*E��������y,g��
�"��1s�g���l��;����1��T=��WT��z�n$�>����<��S�Q�V)�؇y���h"EE�g<L��ٟ�g~XĞŅ��9#I�A�R��\_�_շ�E�����hǃ��ĉ�?�҅t���h�D"B�^�+��_�G�כ��Ɋ�X�ټv<ه�?�t���''�}��9�F���7�+i7or���7�6�HO~��G6����''��qv���y��2V�vߦY��� !�p�ܚ�z��]ӫO���r*��F����Z��m�πH�����<W6�� ���U4S�@��dw/%�܉$9�}�''_��3/����X�A{��"����|�=����R�&�fYC�?3;S��٤�/?����b��"���� `�敝�G4G��:[��/H*�5?�<� :��6;G�!�N�gl�P� Y�#�3��C����Q��$�i9�L��7�oyj^�����ul/�B|���fw��[y�ýN-Dw��n��ۅ醓��<,�������vk��"rAr���4�A�ê��Ʀ�	������ASw��)TY���$]����O''�쉤~�d�����{t:L��a`o���A{��H�!���2K�/K`��^~䷛���^�+���zj�%t��9�G"���!��z:�]��˭���w4"���:l����>;�<�w�;��ئ�r��Z��岛� �Կ��F�um;���f�ɣι/��$g܂�`��Mo�m7n�ARm�W�n�oD��@b��,���m��朎/�WH~���(��H��}��ٕ9�Ƀ�2�A9��`�[�� qa��n �J���*��5n���y�n�>�F���w�N�]S�/Hz��x�r�̚�dej��N�4�g�ơ��R�}QZ�+G��7�l�����4�Է֒��C��zR~�V����bx����KU��陟S�#����f�q��jm[p�������]�+����S''I�m����"��@D���T�����:lOT�v��VՉ�ST��z�N����Ea�@�),���bk�U�Y��k�3B����\qt��s�O{���.���i���	�5=p�pv~�/+�c�L��Y�/�2�RN�/�\G���>$���+_+�\QFo���Ug�i:�qwE���gO�����?�����f�Y��ow�C���{�`Ui$�Գ�<L+�C���6ˀ���
�q��Ye����L��@�%���zR�?��''�$�_K�w5���`���"��[�g~F���^�_�\�W{���^Է��~�Q��^���i��l���/=����wt�D"�N�խ��Fr��)bYr��|צ��i�T���>h�^e��N	N��=�1��] ���C1�K���jB��I��wg��W����쭃�Ng4\��+i��s>!��䯃�(Ύ�3��''a-��<-,����np)H�x��,�Ei14��T,R���E���/�M��U�9����o�����>-3�|��Q��t�B�P�i*C��<)U7����I}�VR�������+ӄ"[��$���y?�ݞy��ay��)K�`Ak�����U��Vus�����-��c�\���>���N��8b��@D "0�>.���wM�]*���_��7����T�Y�Oʘ��I)x�4߮��ۿ#�v��>� �9�мKHb�k�3.=�M<���0�h���%r���B�O� �C<�� �	��pK;D�����0V&2L�}�)��6X�o�#�]���w���w�5��@�!���8�K�����	D�5�*����dO�&�>t���㮯ö#�H�)X4�B�~�O���W��gl����$Kzcv~�4$�ףM�g���x晗�����4�&91�9���^ᕭ�7�6�zS���|K��|���^~�����8b��@D "h!`{}��αoy=�U�\T''���ĚF�P*�Z��T�<dl���	�FNu�yQ�#�����D�*\{��''��`����a�CZw�"��3b$!����_�����s���@����9�d%5\Bf�_�,�2�K%�.\��/���-v�5ܛq"��J
�a��<�m�!.��*<hiLgsusM���j��S��	��V��n&���ͣW���I����/%���g��(G���;rHY��hM��za�V ����[yBb��2�� �N-�ym�zK~w��k휝����{|��߽x1��7�."�Dv#�>)���.K�˩�g���kI�6�|J���m��G��)�M�S釜�i2��o���c��Xm�>��	�!�:u''�������-��4���� ~���"$u�K�~�''�B���������n�\��;[��	�@�< ���WsG
�������́A�H�qK�\�\�"�h�\�&�/�3�c�ɌH}}��W����y̪�I�6]�������܇cX���l�=��6�A��;z��z�k�j�>|}��Ȼ]��������7J3�G"����p�~�.��a!���U��K@e��R�?''���,��w�.X��iw�Hd8��8�''�>`��Ro����)�|�w�B�O..1#���������T:�2�},���;+D��=0�5@��5p��_���1�{=���u��a��H�8�vGSe���:L���|�0��v�� c��$�y���{I�z���7�[Ie�O�d�n�Wb7�}�n��j��������������<��x�)��dK��W�m�.��Q����L�o��Ʌ��!��%"�D�@������/
{Z/�w�G���� �U��% ��^�KR��2r����+$$��H��*L�{j��
�:`�O�Klw�����ow������繫�!;��3�H�
�)�!;#�9i�!��;�%`7����w����>"�gnz��v
Wd;��QK�h�འ/F/�Eƿ�ek�y]�������&��)��5�/-j$^L����.Ax�ڟy����''߀^MY��s��j��Em_WW���ӏ����By�~����o�rMD "��]���,;��$?��>�oŇ��N+��UG��/D����:�{ ���EX���$BO���sJ��D�b`��m�O���"�<��	89��a{Y]v�]�q���xǶu�a�w`�cU �N$Pc�|F�c��ޣ���q$�#���&���;i;��Wo$��_�hx�H�(=�L2����Hq��#�3H~���6j��fM�NZ�^�w0������ݫ^V��������T.��J�?9;w�?x�b��r�W��@D "0,���Ebf�*ɿ�����#�+=���F�Ye�A���q�h��@ ���+���i���K���l�]��{5�f��2Xy����!�Q�i�^F}FU�$�"�Ӫ�ߎy ���F��s�̡��''�'' ��W�ߤTYOJs''�Fe+�^�3[�~YOg����9Eu��� ��8��3�������:M�Ԃ�Wo��^��i<������l�_�W�~�o;��)��X�@D "0rzy�[��v��xʏHm��
��M_��)a�l���''�t�����硁�#i"�H�n.��w''�4��ĶQ�¹� �q���F0V���x83*�Oj�h�u��ԹA��);AF����)+~��B�i��n�t#��]�,��_����m�v�kIc�2/���u�?I��k����cZ#�顯J�ϳ�������海_�̾zk�zF����k&Mo��+��?y��7�."�D�G���C�_ɲ���I���	����(�]�L��?Q''~u���]�O,��.����5MH�@��՘`�q�� �*Ԑn�Hx0?&��D�ݩ���EEkJ�E����Q �l�G{���k���Q������m���T_���u��׎�v�-������������� ��z���nUn�T����KaK��0��������[��/n_w�߈@D "0X��b�,��ͬ�$E��cifD����1\_���/$�Ge�Y�϶��� ������hv�#�=�ؼ�QD�����27�!�6/_g��q������"Ш�����N�sR��L�o��V����w|oR~��/.S�3}�]^����f���S��OB��+�睡�������������D�����V��w��T�߫���:;��/�Ie_�k=���:cQ���I|K�ߖ�I�e��xClK*��F �|������i��h�a�=αNv}���E�����[y3)-ܧw���=i,/j4g�j�{S�vL\@�,�m׸�^�ח�ϋ�w� �� ��fI��ff��7N�����=1��mN�6"�D�	���c�e��d''�!%�*��%!�c*�%���?�֭+Z��I���8�2�i�����Oj�B컭�<�e�''ߐ|����~?(�0�@㮶�{C�ם:kY��\O�׿24��N��uB���6*�_�])i~�{���Լ ��ٟ-�V��|�S''~U�pG�D"む���1"u�՝�J���en~��"��ǵr9��T���U���h��?��;�F�{����$��4K�!�l��$�#���D ��������u��ݳX���d?.�w,��JT��߮~u���^����܊�W��?>]^����u���7��@D`l��?��lgψ����g����*��.�1�4�d�}m��J���@�*��T1��B�}�!����<^9nn��~P�?��p�c�pj_�Mm_�j�ס!U��>c�{@9&�;&�]��o.�~��z��j}/r,���KI��/��XK�D"�}���: gֶ�O������;��}�><G��Q*��D�����K)�����O�4��ʾFQߏ&"p�ԯ�o]��m_G>j��9��z�8�ei��
�m����څF��߇I�ŴT���>6�O��1Ո@D "8c�%�*�߯B���1�/�@��+��Ke�kR�?#���� ӈ�E&��K��E��2"Ϩ�y�Qe��8zE [��Կ�[F���7*I��V��:��N���uBexv���k�ݩ�Tk����J�n�i��s��/����F1�D"#G`�};���������F�q��Md������dK�#��ī�ediǄ"c��I�=�G���t*�-�����	ɏ�Me3~����i}���<���(��v���~�0A��>�z(K��T����^�x��(,��������O�p!��o1\D "�cO��H��T��݆T���w�;<�w�uNe�qu��u�1����"�E��J�:s=���0/?��Ok+l��o�~��c���q��դ~�kҿ�lB�m�?���ťki>������o�VߣՇ���N�?+''eͣ���C���#��@D`l�(b�GM$��U���0a  >�IDAT?"���c�q��Ȼ��Z@�0��rr�:��ubz�qD �}U�|��/�?��|��K��?�/�qldS����ھ���vi�''�7Q��7�������w����4����SH��i��g�y������0"����[nmeO*�/�<���vԚ�:����7����@~��q��� ��wjN���Mg��<��|S�׋!�͏*���J�Um_��?K�s''��TN�Fív/��n&����`��RO.�q��ͭJ�{��Y��I��M��Ӹ}]�(ƀ��@D`�(�ϣ*i�}k������>\�:�w��:�*����:�O�:������t�@��g/�B>h��y�y�MI�4��/i (�ˏ�B}6��}�7���ZR�u
`���a�����~���xs��{K����s����]��u��]#����"Px���_���|�
�Vz�Vzo?��R>nJe���Ne�9���q�''���}����hݐ�m���@��фA���_���4Vre����&�;�''�o{�ΟH�W�v�9�j�Zp�������ۓ��[��E��������F�w�.מ�����ŠPq�����#���$ 0u}ƭ,{b�b*��G�ۥ�?w\���$�"�n]��w�2�����PL�@K�;E��uP����N9;�=[��D��}��C�Yt��B[��uo/EsY���Z�X���=�d��w�s��0�&}�m�̋?��r�h�ʵ��;�����+�q�]p�|�Y;����V��x��@���u����@D "PH�q�t�i���2����W+�_��@,����C�+����ʂ���3�VH��/���gO���Nz�A�������Yq˩aǹ�%�^�4[��|O��E��`F�C��/h�H�]{(��Hq�v��QO��m�ڏU�g���?)?�J�U6���?J��M�߿%IO�K�����-/ƕ�w!����9�߸]���J�{4��߂����*�����~*n_�	�h�D�����|�郷������������=+�;�C>����淰 ��-��e����D�U�������=r[��>����~쌸�b����G�"����Z����H�Ы̴�h�����7�Y،�줎?N&=qR~�/i�r#�~�%��]>�NJ��K��<4[��$R׏�@��Wj�{k���j��ӟ�����[�D&u��|zQ��?~r3�.�/��"v�T������oTF�yXd�#IkɎ���棲��H��Q�cZ�6��+�6����!wQ}��Rk|�4�7�|�E��~��#�V�O�U�3��v��p�Fs��J���r���NғJ��w%�J?��lm����7�/�G�Ů9X٪��ť���F�}]=�ද�����oկ�C�����@D "P"��R�''Ӕ���8$99�U�?����xK�`C�fPA���"-^e�k��_����n�C�F�7 ��� 
�c5��m��0�}�r��U�[UC�oJ�um�|��>�y����ioWF��f�*���UD_�6b�U$�?F�.8�|��w$��_��{��͡g>}z��$=sA�lRz�sI��I���I���w�8��{�b����=��k�ww�ه���o_W�o�?y�t��xb��@D "�X"���4�)o���U����j+=V�όX���(�g5G�#��ʫ�����r8y1����4̵ޖ��=Z''���I��fCņ��^���q&�z~��H�W��4���UZS��e3�����Vs~|Y$�q�I��WM
_z�=�x^zJ�{=`������E=|�$�LVݶu��VS\k�˵?\٨W�dO���(�/%�_||�K���E"����#��!�Ы����;R��T�?)� D���P/�~dFĥ]e�5/�:7c*��G��	Mh�	}7Xjp;�4U�����h<`a��0�!�|���DB?�0^yh�I��FM��$�
�#5z��|��3���?����^���JJo�6#�A
��8cR|���>%)���t歒޿�+�q�&ٝum_w�����ߴ=�EܾE���@D��Db���>���!i�	���;Ze?��?z��\T�?h*�H����"ע��^!��c��	��6���8�C�m��d�z��N�����?�v	�>5�N�{�Ȫ;Z�n�k���6���W�y�-]��X=)��;�ҹ''��)%��u��/i|�/>��J�I���:���$�be��ۨd���J���>�w3�o_�X��w<1`D "�
�H�X���������V��T?�����sL�����;��ρ��m���	
V�?�S$�T$Bߩj �Aew��y�H��i! h-Fi���s�4?hW,���Ih�E�j!�m�&������j�ؗ�L�Y�>�}�U�Y$/=唾2vL�~3ɶ�%�?os�m��;Iz�#��KE_�q絤$b_��RR�����b�3Ӽ���)7_�S}u��xEB�����g��ri�''�������@D "��qT4�B����_*n���ȲR��!�.��{Y�G�w��}Hs��ۯ�_��#��W�����TLzd�:���N�a ����T�ھ-�6��?�-O��f��з��W��$�7�9��9�l%}/?�����_a �}��J��{g$�u��_�������7@ @ �@�AR<D�ܥH�R\�����\��T���)Er*N*��*�8:*U��q�,)%;�c��E��(����� �=ggw������ٝ]�3=G��}@������ާgz�ۿ�������IB]�>�"���:�^��k�;?�ފ�b��"��^�� �����N]��l��K��sCi�0��?z�L_+� 	�@���oБ^jY����w�{RyX�=_�?qS���7�ҍ�H���{��_(q�mMh�8*mKE��Co�9֕�#��*N�.�\o�Kzq^>#�ϥ�����OE�E�2֠x�ЗK����?��HC-��/�X��%q�� �2�}V5�|�/�Mn�o�Z6��L��~�>X󃬫j�W��z����}�o�?u���/�@��^<3��o~��eG�������H�H��� ��
�ҩo�w
������e�{0��ݰ��V�a�쟀5_]�q�''��n�گ�̱V��kϢeV�o''u7�]�q�}�}Т�~''q(g�Ek��*Z�������PЗC��,D`~��6u���݋`w������~�ۘGZ��"�j!����)p��#�ǻ�皻�/� N�ﶯ+lMS(����p#��#��\���+6f�{��]�#��U��H�H��	P�7�'' .�/����Ic6�p���A�̣p�oh�$����e߆@)����5�4�j���kA�,ĚF������S�ˌ5���4��$,d��o�����~./����;va�
߸�X���R-��$��O�abri1�)��n��Ԩ/��B�[�}�>Z�c3~Q�}�O��o��@��ֻo�YK��������/''��Cp��9� p�����c= �`�Mv�Y�et�u��^r2/И0�<�u��]X"�����+�y��o��ً�@��O���bH�Xe�g�sG�h�Š���F�>g�K���ш%*�q_��BX�b�;Tw�x���������;筿��F@�!��b�������~�_o& ��o�^q�o����b*;_��M�2K���ݟ|8n��9�����,p3  �����-Ϛ�w�u���
���戅(�\�!n� k��@{��]_mx.����Sp��Ua���YeU�wR)���Q����G�=}l����G�&���ŷ��Hh�/n|��xn�A}o��x_��*�7�v?�y�H��}|�SXE���w���������n��wA�E;���@o2g^==�O }�Ë���h�:1��Zz�����n �o� 	� 	,F��~12M�������˗�Ƭ�����c0bRd�
�\���~Q�wC��2��J�UV�}����s�pwJѱ��.�*�!�՚O��N�p��"�b�zs�=��׭�b��I��(���|wyc��@y�Ӊ
�I{����Ż��o����#�M���޽���S�noa�K����aK��Cl��''��w����.�==���Ib=  ��(��i���-K���H��w���$\��H��^k9���.�\��\�+�md�+nK,�#��V.�|��I�|��.�F�T.8�%_o��� 	TF`���Ž�J"�''�N��=� ������?�Z�U�5�	����y�O����D�:���E��-A��i���5�Č��-����}�y��@D3Ɯ�G�����[������?wpK�O�rd=  (%@a_J�E�㎿�)�~a����ge Z����и��n���.��h.�ɘt\�	�ןz���j]��ߏ��k�N���M��y�˾
|�� ��I��,��8��S��K����9�A����W{��:�+�����\Wo���Q?0^�z̷7x�ۘs�
ޯ��V�76�pn��d<S�<z����g��  �� ���LZ~Ͳ��&�˗ᲿQ�?a�Q���~�	�ᑠ�U�+LC�Z�8p�~	"8��޷�O�m����{���c�3"���E����ӛ궯�XH��%�-fKp���4��������''}�z�A�n��dӢ�Y��H|� ^O`��R?أ>�m��k �{���*������|���Y�j���y�䰝��h�q#}�+�<����� 	� 	�@m	P�זg��.��t���.�9y�w�7��/����%?���:��]���{��.Dه�k���UŬ.Z|k>np�k;�o1 �ห�~q^>]�;��s���^D��L>�}�����)�{�Y���/�=�W3��d�$�z''\�{�2���I�o~��!o�܆����q��>��#��p�ٚ>�J =x!���_��yŴ���KL_WӏwF$@$���?T�쏫��@�e�/�E]$�3�����p��(��Ct$hc��v!o�.*��b1y.�]������q���||���[�4��??7:��c����4u*��n~��W��B�J�����c���͖�D�;?��?���n�6����}�o%q�C�o�-�����U�j;���#~=K�s/O8?�r''��B���e���훓z�H$@$@e��/T;n�<i���t�Ƭ6�.��bf�+��Q��]9�e���tO\�7կ�h��[�០�ϵ�E�(��y����78t���/�˧�~��;��攟�r��''��6�����Ķ��~���.j�עϽ�3�����-~ ;����K]��i�F�i� zY�#��H_�Hh���6[���aE  �� �}��y��5��}K��w�s�8�@x����΅G��O���)��3p�_�}�s���ܪ��Ex�)�� |f�/���j���m_�>���ǃڔ���ϝ���l�u���<y�g��!�{��ķ�!��ļ���;�C�����VO���ο*�?i��P�Ѓ�عSC�ӘO��''�x�}/K�ցM����`5  E��R(
�4� .L�L����\�o���œ��� �tN���@{;qѥ���q�7��e_l7Ĭ.Z�_;͚��\�e`�s��|6��}�3�^G�h�{��;#��z�3�λ�|�:�^��t��h&>���]|��\�f	���S�G���N�G�ak $�_�b���X�H�H�v(�kǲm����1���KʘU��|RS���!���:p#�%.�.�˰�O�etߖ���A���Z-:?�T��GG�S�:"#C`�/a� 8ȶ%P��z��2h>{�K�u��:"�cN�ؿ�ç�YVA1����Z��T�����+Կ�Í�4C =�9�wx�T3������U  �y(������,����t��~b"�ĵ� �5TX��8��%.�g �O�e\���?m��VK�B�|M-���S
�>��1`���{ߢ��,$�r�|�e�Z���/�a�7�S���)���C�;�e?����	Ct��D@o:o�:5lg�{ 4����I�H��C��O}0q��˾Fi���_!��X�.�w��^�^�֡��p��e��>ܷ�B쭬W�Q�h���7Y������z��Eǩ76t�O��+��g ����� ���d{���z���lJb����^��������=�����X��	����J��nt =Le��}*璘���߾[��졭��d�$@$@$PB�¾�VG`E��.��t�5�?��g=���k� �Ʀ�[�e''t_�y��!�km��''q����b�}�8�)�|�E�}��������@��0�ܢ)�*��=\�w�c��\{�3������鹹J�ٗR�O��Ν8G<��ׅFǊ$@$@�''@a_��,�����˾^L�Q��K�
.�r�?��U�}ȿ�+ꚮ�NHP�?7"�ݭ���ǘ�Y���rDmG 7%޴�2�+:�~����r�;��B���7m�����ʸ/�u�<��oP�bYӖ�?X-=_���u��	� 	�@�	���K "rR����f*kn����Y�����n��핺�`�~��bp߾F�U�����%=^��C�ψ|��b�W��,��|��jxn�zm�8Hy��`��YMyg2���Kqϼ�[�K�n�����s��SW�r�9V��-뻉X�_3}]UY�H�H�p��B��5�/m�3�6`y���	ka�(����=	w�x�-:2�kٷ��֋���W��J��j��٬��ZB�~��e�o�sɚ?M�݅��s#������~:How�D�E��#��u5��a�s��/R��1D�	�c����I�H��!�PKi4Cd��L �|��]�e?�����4�� ���hd�!h�e��(�ga�=k~[����|�	T"���9�����,������_�U''�^i���	{35R�nj��ۻRLr�$���p�f���f$֍���Hc�c������I��K��n���J_''����7''��~��	� 	� 	�
��8L����E��a��|n<kv�U��p��㽸Xk�\x��"W��?���[H7�Q�W��Q��i̺hA���ϛ�P�7�Q`jI��P��4�]S�X�d�����Ӳ�z�>�-���������q�E��WQ��㸳<W�_8)-0詼y��P�8�yp���[��u�q�V$@$@MK �m�;ֶ`�_1���E��<�rd�ל�B_�I
"��oo[�%Sk�����A�7ښOA_r0���L����e��B����Hl�j�u�a~�^���1�z�}an!@�Ͼ��ĵog�m���$���|Ѯb�XT�k������.����S��x֕�#�=�߈��_��?���U��[� 	� 	4!��_�&��D��ɬ<TH����o^h�����<"� ��(��k;�_�e��k�b�{M��B�H`� t�L�C��_Jr����/�]����e�''$�rg �q�S��*����mI���i�[�Vr{�w�ͺ��^*ދ_�`]a�^�kѺ���:�26��_�N��L_�� 	� 	4+��7�a�%�>u
�Qa��L��-��&���~c���-p��E/8�p�e�e.A�,:�C�.Z4�^�Я֚OAp���''`&�+�J�k�="KV���A��l�!�X�Lm�_2������*�g�>7��{���v~T�mGq~�	�
˿K�>@A=ܬ��z�����A<��JE7Og�7.�c+<I�7�d�O���RbܞH�H�Pط�Ab�O���:�-�@\ .���`�����׮�F�C����"9�w�.��p�߆k՝5n�iv�����h��"_]�U��[T�#+�o�ھ��܎Z��Wa��X/\�_�շQ̈��W�k��ԎG�E��Y�����׷P,�a��O\�<,������jl����F�Q����_Ž�5��pi����������u��$@$@-E�¾�;{#��Kc�?ե���k!����bq�����}��+T��e׵E�������\U�l<�}��=8���i_]���}~���O��;��[a����g�X+6�4H�;K�Jz�����G��%�~���.�s�A�̲����3�BG*S�oy�7�ѿ�H�I�B4�������$}u�}s�N����������u��$@$@-I�¾%;]\0���O
�2�l�spه��%�Gp-���$�/�e_����Xςr �h����~:=X�U�B_#��MK���W���ֻf�W�}����+��"[�H2�/���:=���ĥvz���X�����Vx�=_�[���Pa��؅76e^��v#�����Ly���0}]y��	� 	�@k��o����W@�ײ�b�����K.��b��p����]U���e%.�����V��϶�V�rEk���Sr�ߔ}e�H��*�[��Rl�M3�k�D�vl�I|sc�	nDJ2�#+W�I޶%���g����"_{Q�����y�x׭J����o�>c��.OZ�g���!�2}]h�B$@$��(�[���	�"s
���.���Ҏ�ﹾ%_]����q���
�;�/r!G���,���l[������@��D��Vm)�V_}�}l�VI���V�X�rwW���''��q����w]7p��k&���W7�`�}�����o��@��Їr2�v݋��O�/���\��H�H������$Hkg�6f����BS�������d
�����\��Y�Y���%����ĉ��8���߹^�%��7(7>(���$e����K�WĞ�^�߳��J���ۉ�!t�a���|���|��"޿☵��=6�OɫSv�mp XVv��o��u��5	� 	�@��͡VN ��%��<������.�*�Kmj������cX��e����{!���Z���O����������Tw?��S��ٟ��/K�.�C��H�*���4q_��z~^l���j��NU�k)
}}>�����Z�Y���:TA�:�����=_�aY����ӬD$@$@�%@W�����ڌ .@��]
.�)���������]�EnG=M��ʗ�qy�ಯ}�id�	�@u��o�X/�����{Ј
z]T�}�M��J���n����տ��]�#�}/�����s��w�#�N����+S]���:Tr���0}]��X�H�H�-	Pط�a��A "_��_(,���Mp��$^�5��]*�љ��_�z*n�ϻ�������'' �&&��_��w�.��}B.n8��b
����͋����Y}�>�Xc�,���3�~�����D-�=�Iq<3z���i��>�5�����6	� 	�@���o�C�5��˺���PX�z''��$�O�.���j����,u�|D��Ú�t��:D�H�e��Ūq=	�@t�y����{��OH���
�{�},
z},>�&W���5���-�˒e+�7���*��\��)��i琘���m1}]ht�H$@$��(����rt"�����^a�	��''�x����ߌ��C����e�������- ��	xc��^�я��u]�Ί�����*��.�!��T�N�8F��G%� gדLθ��s]_�2�1���/E���C�S��Y�����?�o���+� 	� 	�@���o��aEK`E��"z�˗����.��$ BI#{�6g]��Fнa�w���Y0�F2`[$Ќ��U���|��(��5S|�h�/�#��Zt[K�DR��I8�G�O�R������n�>/y,�ɴ��.��-Iu������zTZ���j�L��y���~��$�W�V%  ��&P�Bh�Arp$�,�ߓ����1? �|�
	��Ai�}� �L�e�n���(],$@"0r�}I��Le��^���|�v����y:�����eS�e��Xw��m����_��|?�<�u}���������W����zB^CS�F��2�QD��!��ubžx��0e!  ���f!��@*o�W���e<�n�uE�����e)\�oC?�_�G5�K-J@-�S��%������^��]7[6|���ycv��e����=��^�g_��}����6]�V�KB�wwuIw�K��p(�<w)��¹l�����L_�8�C$@$@���q �& 0i���?�/���?�k���u˒�t�A���	�ecd}a�$Ё<D��dd�Z�''���V�R����}[6^�qٔ���r��?��}Q��Z���/�b^�㤠�(�U�kQ�~�6�Fs=)����a�0}]Xr�G$@$���_����@���~2���Ჯ���ek�}�u����e#���>�Q�ݑr��/�U���f�8=x�;}Ev��?e3��I�p�o�y�Rq������_��K��ϼ��蘒w]31����H�]8-������L���v=W�@�!	� 	� 	��^�Ϡ�h^�ys7bB�e_�;"vٿ\p��-��74`�%��K ��O�tz\���/e5�n���_��������k<�i)Z����U_�qƳ捌�t�����~�RL_�%����XH�H�H�B���UH Jicֹ9y_�A8�>�ݲ������<\�oF�n��/l�:�@���"fjdQv�
���dV�����V���/}�T���;���l�=]��m�K�{�$ֵc�o���݈�''  ���''��H�U	�e�.��?�y�ۢ<s��e�.�Q�݉��}]���g���o<,���B��}a��v_��]�����E�,@��Kǘ�㹞��sg5��V��n+��UÑuI�H�H�� �})>''�''0�7w:�O�7�k�;�~�k�,pr���w`�W����]t� ���@�p��sq����nN���-���#���_�|�V�`���
�_8}Ĭ�T6�f�,�$�4R������%  ��~�+�ÍI�Z���1k$+�h*=��?���Qub!�E���
.��SaE5�KML�;���/}��a��_� �};
B�$ ~�g]��~n|��k`<�{3���1�.�`���C���B�cE  (� �}���	�0��wM��QaV�A<n�r8�''�.���V��(�nyf���~��2�������|,��|v�/Y�v���Q_|OW�jǋ�I9K����W��N"����M������$@$@$@�%������$О�9���>�LY��?���U��k~O�e?�`��y�9� `\[����)��L.#�n��]����xT�^�]��5��U!�g��T��=_rد��ׅ%�z$@$@$������ 	t0�쯆���R��#p�_�u���eNP�zDŁ�@�����L6+9;''���|�3�y4��5X����n򵜷t�~�s ��Ō���[��ľ������$@$@$P&
�2Aq3����1Vu��c�Q��7ނ_]��\�#�	ǟcl_�nC��%���W��G��|Q�3�w�ܾ�X,����u�����H�H�Z� �}K&v��!0�3{������o�=��hz�.�2�l]o%c�,��G0*l�jI`2k�<y5�2V���j	��"  �P�G �M�@+7fĕ˾���e�?�q����w�e?���8�m��/l�Z� �ߏ��_��x�����g����X�H�H�jM�¾�D�?� p�M�r�Q�@4�� ���r��oC�_�J�ڄ%ś.�Q�ݬ��i�+)g?�oֆ�$�ׅFǊ$@$@$P/��"���@�Ț��Wtٿ�!��qR.��w\���jl�jL`2g^;=��v�a�����H�H�H�P�7�Q`H�����?aÊ�o�c�毌jx��籼k�4����Q���@�\<5�;����(L_W<V%  �����?c�@K "?>����`ɿ9J��@���5��ȂFɁm�?L�ɜu~>6���pi�3}]ht�H$@$@�$@a�H�l�:�@*kn�I�Y��ȾB?|�*Y�#p�?�(�겯��}U��I�)�N�?�0�l��	���uMq,�	  (� �}���	�@M	���7���$���,��k�@;�M���O�e�f<�\AunJMA �7��''׻��Y��c�X�=�5y����.	� 	� 	�@�P�7�5["X�@�e�X����E6m�j�w!�/\���Q��7�<	C�52zz�~}2��u��f~����I�H�H j�Q�O$p��ى|u�xH����ш]�G���+:�M����!�|�r���v�;�*t��.&��Vl������V$  �� �}d��0	�@9`�_^p�����eM9��M�e�uX�''�	D�Fٯg���R��2�3{n��u����$b���d���V|�H�H�H��	P�7�b�H�f	@��&��E*=��a��;�n�A蟄�?��U���.�����-v��;w�j�|�1G�7��U���I�H�H��P�7�aH��&�ɘ�yK��_��1��+�xC��1L8K~�e�.�5f�ɻ�g{
��R��G����,��.4:V$  �f&@a��G�}#(� ���Ryy��貿���5�"���Q�''eӖe[����:���tvi��	q�)����?�߈-O~�`�5z?�H$@$@$Д(��S$@�P���#�y�|o �H��#+���19k�J��߆��e?���:O�͉�Cy��������몡Ǻ$@$@$�(�[�8��$@U��5��O`�X��OV���Z2�|d�1/߂5_o8�e�:�mW����!��i��g�`�GȂ�u1+��C����V#  h�-r��M ���PZ:��''<��eCm�\�^�e_,y�;&�n���,�^�^X���ǝ��G���׵�G�C!  ��Pؗǉ[� 	�!�|.�G �<B�ȁ(�	�.�g
.�j�?l�q�3���F�U�1��j������$@$@$Ъ(�[�ȱ�$@5''0m�f{�e�A�쇏>^m�J\�a�߇���jw���G g��''���y׻���1}]U�X�H�H�Z� �}�A��H�.`�_���㞦����p��X����),�n�e"\�w�Q��41��ę�W�w?��çid��&>��	� 	� 	4� �}�X�% �%�.����4����(�R��_��O��(Hem��i����=�Y����%[3}]	>%  ���g�H�*$0e�M겏� ��G17���]�nsKR���&������O�k�s&s����y����<]��.4:V$  ��%@a߶��#hX�{�9y.�|��hsS#�]��e"�V��W�m�F��b�''�O]���8�1���x�
L_W$�G   �y�_`��_� 	� 	�����V�?����yB�,��N�ey"�G�?���b��ȝu^�vC�/�x�
L_W$�G   �EDv��H��H�چ��1��<�� D�ð�/�lp���q��X���Ok"�K4<:�������xf{5��q��x��6Y��� 	� 	� 	�7
��>�	�@��Ŷ.�����o��k�\���e����n�fm���a{�v��U�������$@$@$�i(�;�s�$@MA`*o�t���������>�?W�Sɘ,K��  �e��O	�׍��_M�cbB�,��β�|pS�[����� 	� 	� 	t
�;�.	�@����z/��+��/����L�-9��ಿ6���F�����崳S-�Oo`���8��%	� 	� 	4)
�&=0�	�@g��~r"''�`���?��mQ��˾��7!�G ��e����Ҍ�N��kg��=H_����1}]5�X�H�H�H@	P��s@$@ML`2o�����-Atu�E�݂�~7\�!�����a�yW.�Ν���Ѫ���uU�ce   �Y��,��H���@ژ�.�0������;|
�jGjI���;X���d]��l���&�97�8�q�`}�L_�쇚�#  ��#@a�r��& ��4�p��(Xh*�''!�wDť�����q���''��ԫ��I�����6xLl����2}]5 Y�H�H�H`A�b�J h-�9s��ȷ��{#u�� ��\��\�{Z��lo3y��a{�v�;f׆x��u!��
	� 	� 	�@�(��%��H�H�EL�Fly��Tz"����"��[2	���vwB��G�%\�]OFN��ǧr��p������u�ѱ"	� 	� 	�@�(��g�-I�H���e�+���p��y�O���+�A\�O\�7B�WM�N�p.�;?���!�[�����I�H�H�*''@a_93�  ��%�Ι�.D>\�e��~xkt�.\�{����e?��^9;j��<SUZ?������=� 	� 	� 	TF�¾2^ܚH�چ@ʘU�/�K��~_d��d
�7
.�e}���s͹SC�Ŝ��WU�L_W>V&  O��><;�$ ��! ���TVt�Tz����>��������e�32un��ejڻψ	�-��u�X�׷��k;,+�6
�H�H�H�ePط̡bGI�H�q&�FS�=�;�����O4���-��R<.�Ú�Sp�Eů�P�}�R�ޅqm��vI���Jx�)	� 	� 	�@4(���VI�H�e�#�������\����vԖL\�s���.�*��T޼uj(︞�9���ׅgǚ$@$@$@5''@a_s��!	� 	�/uٟ��������{wT��''�����+p�� �+������U�7���b��}f����X�H�H�H�~� �_s�3	� 	�@;He�-�!������]�?���{����}A�ץ�;EL���A���ǖ''�r��k�cȱ� 	� 	� 	�>
��?�	� 	4X��Ryy���F��0"�"�X���髹��1;������2��mM�f?�K$@$@$@�"@a_/��/	� 	t0����#G]��S�>,�{����SW�ݡ���u���-���+� 	� 	� 	�@P�7 2�  �N''0�5�|������7�����}h�   ����1P�H�H��`�_Qp����������na�E�����H�H�H�"$@a!|6M$@�N@#ԧ��s��{겿�VL*�L_W+��	� 	� 	�@(�#��&I�H�&�ɘ�B*=l� �~�9�e	{��[�@p-	� 	� 	�@K��o���Β 	�@��5�d^>�y2�Q?	���������*A�mI�H�H��� �}� v�H�H ���{őAϒ1�y�[�L_w]l|�H�H�H�	Pط�Ac�I�H��	d�ٖ�A�#�>��ಟ��d����:Q����O��I�H�H�Z� �}�A��H�:� ����yy��Tz�ﲿ^��{����O�O$@$@�O�¾��1GH$@C "ߚ��q}k����''��/�d��(	� 	� 	�@����p�}3ۄ�    IEND�B`�', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222553, 1157235318189994467, 1157235320526222551, '404_cloud.png', '�PNG

   IHDR   �   �   V܃�   sRGB ���  XIDATx�{��}ǻgv�NBHY�����C��	?b�2N���6AT\I���󏐧�-*���U�ĕە��H�.�&NA*U�@��_�`���,�N���t{���|~����ivog�ggv���w;��_�������uO�V.d��1f]5P;Ln7Z����Q��V�J�Q��}�j_��~��>���	3�	��  �����zT�P�2!��d*��>C�}J{�&T����j�M�+�؎`)b<e�e�J�C����5���Z�ZC��Vf�������&�ۛZ~-(vk�V�@����ffZ''�i��Y�JZ�q<��)ҤyZ]��W�w@�6�H��,	Z3q!�W��+C!��u2������L��@e�t���}nXP�8gV�g&�,  ��gM%P��C���6�����Z�W}_����jy{�ͽ���M�r�l��T��kC�:3�:e6-���)��s���_�C����>ɂ�[�6�+�Q�J�§[��!ِt-*�U��''K�~�[�T� z>�fڶ�� ��J�~٘�m&�7''w��s���>̘}/�+Q��}Es)wC�{��R>8�MV�o@���+@�ƨqȯ��w�K5����\�=�&�Jλ�m���#t����v�z''��ԍB�&k�wU�u`�������K�2�)r����*~/�q[��⒗��^���@��ųp]��I~�fAWSC0��Nm�㐡���7����x�ez�
U�0
���{+x@X��5��k<�t�?(�eDZ�fHhQ����&l�N�)ڈظ�m(�k*wu�j��k\����� z���A�I��5+<�F-���t�Y�=�`ӻ ���R	}O0��M���ˀ>?�J����gl��{�Ұ�UJywE�T5ܝ7rI��c=MG�5�Ĕ�ȿ�Q3G��k+�uF��^��rUN�h��[ڪ��=��[hɪ6���lҘ�� �����RQ��Y��t�z��6^}I0@*���z��삯_�9}�b�2����f�}I�r_��^�g��u1��S�R�oul#
��P2���6Y1����۳�ϯÁj���S�Ɩ��XAz���+�����]�A�qr?/�˵oƸk�������aٴyi��L�\�%�X�6i�r�7�j��1q}u��$VO��"+!�''N�''	��c�� �G�V''�k��QVB��?rR�{�`ժ��9�����g܃KB<�z�`AxO��f�&O��={��~W�l��o�OU�]B.�_�{�>X�Մ��������m/�[���~}������	&�D:0fs�͵�l�di�>���tUG�gx�������������E��죈������jE=Po����`��]@K�����U��Z�8i=q��l@����v�q_,�bi�� 0���<z�E�G
����d:�Co5��L���C�b�g���=��G�F5oB���䭏3!��Bjt������Z���ҭ��5�+q!��f����ϴR��X�z�-���$�/��}�}��Q�M�p��Ԋ�A��Z�6j�W��NU��g��ۭ>���%8m��^����ك�cM�5BG�P�%{8����i�A�,w��`��t�bp��]���#�=,���b@q��!�fK�)G�P�%{8����i�A�MoĀ2��~�I�WZ��	��!���uk��`�[B�E�A��x����l����w����,�#X3tܽV�4$�d���`��qד ��Cq	��Pqג" <���n\��l!"�]��Ӈ!�|Fp.8��A�,  /�Ȟ�s/�8�Y@թ���E�ɶ���Ur���;����s�($����H���C�`�`�� p�#��B�8��
�S��8�*�`���;�9��@O?���=ž\�SE�)o��[p�d1�/!��\���+�^��g�5s�RV��O�d�7k��п	�į7ĺK?��*r�"V�+53R��''�u�����I�/����l������# ��sM0H!v"������e��|���~[fC����W��-]��ba�''��|i�~�uds��\� ��:ȋ�pu6	�@~�:P7��,�|���t���1V+/Ė*��Ш�!�h��j �6''���X��T����o";b���E�����A>�U�x6.�	dG��Jʎ`T�L�W�>�L��51��a-T#�p�hᖆ��ʞ�+�������b�L���I��n���������ɺ9�V�P]	��s��;�T�����kK�)�{q�RW��
��x,��dڻ��Y�.� �Ud%��Y6�m��DQ�S����HVKR��ɇT�s''"�z�Us��''��2r�Z�&�b�%��75ɳ�o�c��Z�k�����i`�kb���Z})6Ȩ�/K7�,"]a��s=�il���m�A�7���,��gQ����hf� ����#P��? �e[��$j�+W��1��a�(��⣟�
t��׃ �=d+�A�xm�a_EvÇ��ml�n��QEr�r�A~f��w�n�ƅqr~b�w�K�~GR4��h����Ӛ�`t�K��f/��K��^�!۳B6��})5�?�.����jdS�6�R����D=��aHL��Jp/��w5�sC�ƒ�����a�Ѽ��iL^���8�&�\����V�%"X�j�	��C+��#:����m�m� ��qZ)8q�"2vxk��=��%]��I�h�`��c��wX��SI2X,.�!�%]"�>l��������''�g��+�&
-�q�o�&�B"�	#S��6F˶�d���pe� ۑ��mӀ�u{?�<@����y�B�4��:���{~B�mG�P�1�W!ۆ�&���:���.Lo%���s��P�����&+!��F�3	�E��
d[����h� ��n1� G2I�W�-�Y	��R7��a+�YPB��A����X�	PO!�"]kq--+��=���]�E��)���1�z�W.��x�v�W�|��m�e��}�U��S��D>�d �JhJ��jp�2�wR�٢R 
���u
�֢�~V���S�&��TCC���z;>��Ҋ�~Y���K�N�&P���S�a�C,q�v%�LH���I|^�� ��&���W����I�	�dz��!���\�[�r	RE�}MW��&3���LHg�i���:Y���1�ebQ�L5s���:A�A�z���F�
�d:,�pNf����rO.A�q�l���Yĩ�g��C,YӖy�G0|^�����3��<O�zcQ!�	
y/r�:���u�t�+x{�>{��<�x�-�X�-Q�3��s�LI�G��~4���k�؇�/0P��}��
r]�{C�3P��_A�b��^6�k�n�y����?�b^�*�� �''qK,O7��j7X�/ȟ��hn��V�TVJ<���qKE������wA��K���7UWwA���fX�=�%�0�8h_� ֍�F.�C�-�n�u�#q��k�k�|=H�ز���Ք�[y��$���5�,��R��ߒN��c5B��$Y1q���$��Ѹ�f�<�9��+�C;x�!X$%�
��g���td����!6U��{�(�Dd o}]V&G��l�!�F�
�P��ֳ.�u?^;�t?���9�>�z�k9v)�E	��/x��}�^�]Û���/��i}
�j��L}
 ����ԁ�(�D���T�ؒ���es$xKZn���g���i�c���g�%���m,���{Gi�^ौ���*�E�{����B_Mh�?G�X�vq�tV-0O�Eߌ���N�An���B�~4�Q�={,+���Ԏ�l`�u�E��Ւ��gYM�q�V���2 �d''qK,����c�����^�{���MN�`Q�E�0#�&i��[A�rw�x���=x,S;�GY��Aۭ��5�-���Kx�{>��3�CϽ�)�ܿl��L3�2���g���������X�K�gȵ�-c��rWՓ�8G�A��2]��1�����?��zjd?;�s/Ě����p3f��� X_N�����⯲mT��۩��;�%CT�v���d�7v�H�j`��6G�d5�Z��x�>Y2���5S;��H~�,�٩�3+���ś����`��d�v�����#�Y��P�f���Y8�9�)�P��rS;v85O� ?E���''����q��� �`nj�*��++�y��A�!pvj�ӴXc�aqwm!�]��]�#H�_t�ePJzE�5��c�#WJ ǩ�7�|�YU��b��,
�w?N��kˆ=��X����P_C+���Jx�R��8��J����&S;�B�������R��?>aު��]�ҷ���w�sS;ъ��qK��S����ݡ	n�������&pm�M��VR�~,j;d+��
na}�.��~Z6+o %$��Ԏ����}�8�M�����M#s2���ov��f���	&S;�6��Q[�q��B�h��2kT~d�����{��@07��
�9�c�`�r�7�qy���è7G�5:nB0��ٍ|�V��(���/R%X���O�������������q�����GdC6��N�8��f�`|����Gg��d[9{O~#sS;Q`�qr �����α����N�˲�穩������]
�@����T�����=�����C`>�o.P�M�Ro    IEND�B`�', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222554, 1157235318189994467, 1157235320526222545, 'components', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222555, 1157235318189994467, 1157235320526222554, 'Breadcrumb', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222556, 1157235318189994467, 1157235320526222555, 'index.vue', '<template>
  <el-breadcrumb class="app-breadcrumb" separator="/">
    <transition-group name="breadcrumb">
      <el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
        <span v-if="item.redirect===''noRedirect''||index==levelList.length-1" class="no-redirect">{{ item.meta.title }}</span>
        <a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
      </el-breadcrumb-item>
    </transition-group>
  </el-breadcrumb>
</template>

<script>
import pathToRegexp from ''path-to-regexp''

export default {
  data() {
    return {
      levelList: null
    }
  },
  watch: {
    $route() {
      this.getBreadcrumb()
    }
  },
  created() {
    this.getBreadcrumb()
  },
  methods: {
    getBreadcrumb() {
      // only show routes with meta.title
      let matched = this.$route.matched.filter(item => item.meta && item.meta.title)
      const first = matched[0]

      if (!this.isDashboard(first)) {
        matched = [{ path: ''/dashboard'', meta: { title: ''Dashboard'' }}].concat(matched)
      }

      this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
    },
    isDashboard(route) {
      const name = route && route.name
      if (!name) {
        return false
      }
      return name.trim().toLocaleLowerCase() === ''Dashboard''.toLocaleLowerCase()
    },
    pathCompile(path) {
      // To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
      const { params } = this.$route
      var toPath = pathToRegexp.compile(path)
      return toPath(params)
    },
    handleLink(item) {
      const { redirect, path } = item
      if (redirect) {
        this.$router.push(redirect)
        return
      }
      this.$router.push(this.pathCompile(path))
    }
  }
}
</script>

<style lang="scss" scoped>
.app-breadcrumb.el-breadcrumb {
  display: inline-block;
  font-size: 14px;
  line-height: 50px;
  margin-left: 8px;

  .no-redirect {
    color: #97a8be;
    cursor: text;
  }
}
</style>
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222557, 1157235318189994467, 1157235320526222554, 'Hamburger', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222558, 1157235318189994467, 1157235320526222557, 'index.vue', '<template>
  <div style="padding: 0 15px;" @click="toggleClick">
    <svg
      :class="{''is-active'':isActive}"
      class="hamburger"
      viewBox="0 0 1024 1024"
      xmlns="http://www.w3.org/2000/svg"
      width="64"
      height="64"
    >
      <path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z" />
    </svg>
  </div>
</template>

<script>
export default {
  name: ''Hamburger'',
  props: {
    isActive: {
      type: Boolean,
      default: false
    }
  },
  methods: {
    toggleClick() {
      this.$emit(''toggleClick'')
    }
  }
}
</script>

<style scoped>
.hamburger {
  display: inline-block;
  vertical-align: middle;
  width: 20px;
  height: 20px;
}

.hamburger.is-active {
  transform: rotate(180deg);
}
</style>
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222559, 1157235318189994467, 1157235320526222554, 'SvgIcon', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222560, 1157235318189994467, 1157235320526222559, 'index.vue', '<template>
  <div v-if="isExternal" :style="styleExternalIcon" class="svg-external-icon svg-icon" v-on="$listeners" />
  <svg v-else :class="svgClass" aria-hidden="true" v-on="$listeners">
    <use :xlink:href="iconName" />
  </svg>
</template>

<script>
// doc: https://panjiachen.github.io/vue-element-admin-site/feature/component/svg-icon.html#usage
import { isExternal } from ''@/utils/validate''

export default {
  name: ''SvgIcon'',
  props: {
    iconClass: {
      type: String,
      required: true
    },
    className: {
      type: String,
      default: ''''
    }
  },
  computed: {
    isExternal() {
      return isExternal(this.iconClass)
    },
    iconName() {
      return `#icon-${this.iconClass}`
    },
    svgClass() {
      if (this.className) {
        return ''svg-icon '' + this.className
      } else {
        return ''svg-icon''
      }
    },
    styleExternalIcon() {
      return {
        mask: `url(${this.iconClass}) no-repeat 50% 50%`,
        ''-webkit-mask'': `url(${this.iconClass}) no-repeat 50% 50%`
      }
    }
  }
}
</script>

<style scoped>
.svg-icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  fill: currentColor;
  overflow: hidden;
}

.svg-external-icon {
  background-color: currentColor;
  mask-size: cover!important;
  display: inline-block;
}
</style>
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222561, 1157235318189994467, 1157235320526222545, 'icons', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222562, 1157235318189994467, 1157235320526222561, 'index.js', 'import Vue from ''vue''
import SvgIcon from ''@/components/SvgIcon''// svg component

// register globally
Vue.component(''svg-icon'', SvgIcon)

const req = require.context(''./svg'', false, /\.svg$/)
const requireAll = requireContext => requireContext.keys().map(requireContext)
requireAll(req)
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222563, 1157235318189994467, 1157235320526222561, 'svg', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222564, 1157235318189994467, 1157235320526222563, 'dashboard.svg', '<svg width="128" height="100" xmlns="http://www.w3.org/2000/svg"><path d="M27.429 63.638c0-2.508-.893-4.65-2.679-6.424-1.786-1.775-3.94-2.662-6.464-2.662-2.524 0-4.679.887-6.465 2.662-1.785 1.774-2.678 3.916-2.678 6.424 0 2.508.893 4.65 2.678 6.424 1.786 1.775 3.94 2.662 6.465 2.662 2.524 0 4.678-.887 6.464-2.662 1.786-1.775 2.679-3.916 2.679-6.424zm13.714-31.801c0-2.508-.893-4.65-2.679-6.424-1.785-1.775-3.94-2.662-6.464-2.662-2.524 0-4.679.887-6.464 2.662-1.786 1.774-2.679 3.916-2.679 6.424 0 2.508.893 4.65 2.679 6.424 1.785 1.774 3.94 2.662 6.464 2.662 2.524 0 4.679-.888 6.464-2.662 1.786-1.775 2.679-3.916 2.679-6.424zM71.714 65.98l7.215-27.116c.285-1.23.107-2.378-.536-3.443-.643-1.064-1.56-1.762-2.75-2.094-1.19-.33-2.333-.177-3.429.462-1.095.639-1.81 1.573-2.143 2.804l-7.214 27.116c-2.857.237-5.405 1.266-7.643 3.088-2.238 1.822-3.738 4.152-4.5 6.992-.952 3.644-.476 7.098 1.429 10.364 1.905 3.265 4.69 5.37 8.357 6.317 3.667.947 7.143.474 10.429-1.42 3.285-1.892 5.404-4.66 6.357-8.305.762-2.84.619-5.607-.429-8.305-1.047-2.697-2.762-4.85-5.143-6.46zm47.143-2.342c0-2.508-.893-4.65-2.678-6.424-1.786-1.775-3.94-2.662-6.465-2.662-2.524 0-4.678.887-6.464 2.662-1.786 1.774-2.679 3.916-2.679 6.424 0 2.508.893 4.65 2.679 6.424 1.786 1.775 3.94 2.662 6.464 2.662 2.524 0 4.679-.887 6.465-2.662 1.785-1.775 2.678-3.916 2.678-6.424zm-45.714-45.43c0-2.509-.893-4.65-2.679-6.425C68.68 10.01 66.524 9.122 64 9.122c-2.524 0-4.679.887-6.464 2.661-1.786 1.775-2.679 3.916-2.679 6.425 0 2.508.893 4.65 2.679 6.424 1.785 1.774 3.94 2.662 6.464 2.662 2.524 0 4.679-.888 6.464-2.662 1.786-1.775 2.679-3.916 2.679-6.424zm32 13.629c0-2.508-.893-4.65-2.679-6.424-1.785-1.775-3.94-2.662-6.464-2.662-2.524 0-4.679.887-6.464 2.662-1.786 1.774-2.679 3.916-2.679 6.424 0 2.508.893 4.65 2.679 6.424 1.785 1.774 3.94 2.662 6.464 2.662 2.524 0 4.679-.888 6.464-2.662 1.786-1.775 2.679-3.916 2.679-6.424zM128 63.638c0 12.351-3.357 23.78-10.071 34.286-.905 1.372-2.19 2.058-3.858 2.058H13.93c-1.667 0-2.953-.686-3.858-2.058C3.357 87.465 0 76.037 0 63.638c0-8.613 1.69-16.847 5.071-24.703C8.452 31.08 13 24.312 18.714 18.634c5.715-5.68 12.524-10.199 20.429-13.559C47.048 1.715 55.333.035 64 .035c8.667 0 16.952 1.68 24.857 5.04 7.905 3.36 14.714 7.88 20.429 13.559 5.714 5.678 10.262 12.446 13.643 20.301 3.38 7.856 5.071 16.09 5.071 24.703z"/></svg>', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222565, 1157235318189994467, 1157235320526222563, 'example.svg', '<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M96.258 57.462h31.421C124.794 27.323 100.426 2.956 70.287.07v31.422a32.856 32.856 0 0 1 25.971 25.97zm-38.796-25.97V.07C27.323 2.956 2.956 27.323.07 57.462h31.422a32.856 32.856 0 0 1 25.97-25.97zm12.825 64.766v31.421c30.46-2.885 54.507-27.253 57.713-57.712H96.579c-2.886 13.466-13.146 23.726-26.292 26.291zM31.492 70.287H.07c2.886 30.46 27.253 54.507 57.713 57.713V96.579c-13.466-2.886-23.726-13.146-26.291-26.292z"/></svg>', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222566, 1157235318189994467, 1157235320526222563, 'eye-open.svg', '<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="128" height="128"><defs><style/></defs><path d="M512 128q69.675 0 135.51 21.163t115.498 54.997 93.483 74.837 73.685 82.006 51.67 74.837 32.17 54.827L1024 512q-2.347 4.992-6.315 13.483T998.87 560.17t-31.658 51.669-44.331 59.99-56.832 64.34-69.504 60.16-82.347 51.5-94.848 34.687T512 896q-69.675 0-135.51-21.163t-115.498-54.826-93.483-74.326-73.685-81.493-51.67-74.496-32.17-54.997L0 513.707q2.347-4.992 6.315-13.483t18.816-34.816 31.658-51.84 44.331-60.33 56.832-64.683 69.504-60.331 82.347-51.84 94.848-34.816T512 128.085zm0 85.333q-46.677 0-91.648 12.331t-81.152 31.83-70.656 47.146-59.648 54.485-48.853 57.686-37.675 52.821-26.325 43.99q12.33 21.674 26.325 43.52t37.675 52.351 48.853 57.003 59.648 53.845T339.2 767.02t81.152 31.488T512 810.667t91.648-12.331 81.152-31.659 70.656-46.848 59.648-54.186 48.853-57.344 37.675-52.651T927.957 512q-12.33-21.675-26.325-43.648t-37.675-52.65-48.853-57.345-59.648-54.186-70.656-46.848-81.152-31.659T512 213.334zm0 128q70.656 0 120.661 50.006T682.667 512 632.66 632.661 512 682.667 391.339 632.66 341.333 512t50.006-120.661T512 341.333zm0 85.334q-35.328 0-60.33 25.002T426.666 512t25.002 60.33T512 597.334t60.33-25.002T597.334 512t-25.002-60.33T512 426.666z"/></svg>', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222567, 1157235318189994467, 1157235320526222563, 'eye.svg', '<svg width="128" height="64" xmlns="http://www.w3.org/2000/svg"><path d="M127.072 7.994c1.37-2.208.914-5.152-.914-6.87-2.056-1.717-4.797-1.226-6.396.982-.229.245-25.586 32.382-55.74 32.382-29.24 0-55.74-32.382-55.968-32.627-1.6-1.963-4.57-2.208-6.397-.49C-.17 3.086-.399 6.275 1.2 8.238c.457.736 5.94 7.36 14.62 14.72L4.17 35.96c-1.828 1.963-1.6 5.152.228 6.87.457.98 1.6 1.471 2.742 1.471s2.284-.49 3.198-1.472l12.564-13.983c5.94 4.416 13.021 8.587 20.788 11.53l-4.797 17.418c-.685 2.699.686 5.397 3.198 6.133h1.37c2.057 0 3.884-1.472 4.341-3.68L52.6 42.83c3.655.736 7.538 1.227 11.422 1.227 3.883 0 7.767-.49 11.422-1.227l4.797 17.173c.457 2.208 2.513 3.68 4.34 3.68.457 0 .914 0 1.143-.246 2.513-.736 3.883-3.434 3.198-6.133l-4.797-17.172c7.767-2.944 14.848-7.114 20.788-11.53l12.336 13.738c.913.981 2.056 1.472 3.198 1.472s2.284-.49 3.198-1.472c1.828-1.963 1.828-4.906.228-6.87l-11.65-13.001c9.366-7.36 14.849-14.474 14.849-14.474z"/></svg>', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222568, 1157235318189994467, 1157235320526222563, 'form.svg', '<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M84.068 23.784c-1.02 0-1.877-.32-2.572-.96a8.588 8.588 0 0 1-1.738-2.237 11.524 11.524 0 0 1-1.042-2.621c-.232-.895-.348-1.641-.348-2.238V0h.278c.834 0 1.622.085 2.363.256.742.17 1.645.575 2.711 1.214 1.066.64 2.363 1.535 3.892 2.686 1.53 1.15 3.453 2.664 5.77 4.54 2.502 2.045 4.494 3.771 5.977 5.178 1.483 1.406 2.618 2.6 3.406 3.58.787.98 1.274 1.812 1.46 2.494.185.682.277 1.278.277 1.79v2.046H84.068zM127.3 84.01c.278.682.464 1.535.556 2.558.093 1.023-.37 2.003-1.39 2.94-.463.427-.88.832-1.25 1.215-.372.384-.696.704-.974.96a6.69 6.69 0 0 1-.973.767l-11.816-10.741a44.331 44.331 0 0 0 1.877-1.535 31.028 31.028 0 0 1 1.737-1.406c1.112-.938 2.317-1.343 3.615-1.215 1.297.128 2.363.405 3.197.83.927.427 1.923 1.173 2.989 2.239 1.065 1.065 1.876 2.195 2.432 3.388zM78.23 95.902c2.038 0 3.752-.511 5.143-1.534l-26.969 25.83H18.037c-1.761 0-3.684-.47-5.77-1.407a24.549 24.549 0 0 1-5.838-3.709 21.373 21.373 0 0 1-4.518-5.306c-1.204-2.003-1.807-4.07-1.807-6.202V16.495c0-1.79.44-3.665 1.32-5.626A18.41 18.41 0 0 1 5.04 5.562a21.798 21.798 0 0 1 5.213-3.964C12.198.533 14.237 0 16.37 0h53.24v15.984c0 1.62.278 3.367.834 5.242a16.704 16.704 0 0 0 2.572 5.179c1.159 1.577 2.665 2.898 4.518 3.964 1.853 1.066 4.078 1.598 6.673 1.598h20.295v42.325L85.458 92.45c1.02-1.364 1.529-2.856 1.529-4.476 0-2.216-.857-4.113-2.572-5.69-1.714-1.577-3.776-2.366-6.186-2.366H26.1c-2.409 0-4.448.789-6.116 2.366-1.668 1.577-2.502 3.474-2.502 5.69 0 2.217.834 4.092 2.502 5.626 1.668 1.535 3.707 2.302 6.117 2.302h52.13zM26.1 47.951c-2.41 0-4.449.789-6.117 2.366-1.668 1.577-2.502 3.473-2.502 5.69 0 2.216.834 4.092 2.502 5.626 1.668 1.534 3.707 2.302 6.117 2.302h52.13c2.409 0 4.47-.768 6.185-2.302 1.715-1.534 2.572-3.41 2.572-5.626 0-2.217-.857-4.113-2.572-5.69-1.714-1.577-3.776-2.366-6.186-2.366H26.1zm52.407 64.063l1.807-1.663 3.476-3.196a479.75 479.75 0 0 0 4.587-4.284 500.757 500.757 0 0 1 5.004-4.667c3.985-3.666 8.48-7.758 13.485-12.276l11.677 10.741-13.485 12.404-5.004 4.603-4.587 4.22a179.46 179.46 0 0 0-3.267 3.068c-.88.853-1.367 1.322-1.46 1.407-.463.341-.973.703-1.529 1.087-.556.383-1.112.703-1.668.959-.556.256-1.413.575-2.572.959a83.5 83.5 0 0 1-3.545 1.087 72.2 72.2 0 0 1-3.475.895c-1.112.256-1.946.426-2.502.511-1.112.17-1.854.043-2.224-.383-.371-.426-.464-1.151-.278-2.174.092-.511.278-1.279.556-2.302.278-1.023.602-2.067.973-3.132l1.042-3.005c.325-.938.58-1.577.765-1.918a10.157 10.157 0 0 1 2.224-2.941z"/></svg>', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222569, 1157235318189994467, 1157235320526222563, 'link.svg', '<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M115.625 127.937H.063V12.375h57.781v12.374H12.438v90.813h90.813V70.156h12.374z"/><path d="M116.426 2.821l8.753 8.753-56.734 56.734-8.753-8.745z"/><path d="M127.893 37.982h-12.375V12.375H88.706V0h39.187z"/></svg>', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222570, 1157235318189994467, 1157235320526222563, 'nested.svg', '<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M.002 9.2c0 5.044 3.58 9.133 7.998 9.133 4.417 0 7.997-4.089 7.997-9.133 0-5.043-3.58-9.132-7.997-9.132S.002 4.157.002 9.2zM31.997.066h95.981V18.33H31.997V.066zm0 45.669c0 5.044 3.58 9.132 7.998 9.132 4.417 0 7.997-4.088 7.997-9.132 0-3.263-1.524-6.278-3.998-7.91-2.475-1.63-5.524-1.63-7.998 0-2.475 1.632-4 4.647-4 7.91zM63.992 36.6h63.986v18.265H63.992V36.6zm-31.995 82.2c0 5.043 3.58 9.132 7.998 9.132 4.417 0 7.997-4.089 7.997-9.132 0-5.044-3.58-9.133-7.997-9.133s-7.998 4.089-7.998 9.133zm31.995-9.131h63.986v18.265H63.992V109.67zm0-27.404c0 5.044 3.58 9.133 7.998 9.133 4.417 0 7.997-4.089 7.997-9.133 0-3.263-1.524-6.277-3.998-7.909-2.475-1.631-5.524-1.631-7.998 0-2.475 1.632-4 4.646-4 7.91zm31.995-9.13h31.991V91.4H95.987V73.135z"/></svg>', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222571, 1157235318189994467, 1157235320526222563, 'password.svg', '<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M108.8 44.322H89.6v-5.36c0-9.04-3.308-24.163-25.6-24.163-23.145 0-25.6 16.881-25.6 24.162v5.361H19.2v-5.36C19.2 15.281 36.798 0 64 0c27.202 0 44.8 15.281 44.8 38.961v5.361zm-32 39.356c0-5.44-5.763-9.832-12.8-9.832-7.037 0-12.8 4.392-12.8 9.832 0 3.682 2.567 6.808 6.407 8.477v11.205c0 2.718 2.875 4.962 6.4 4.962 3.524 0 6.4-2.244 6.4-4.962V92.155c3.833-1.669 6.393-4.795 6.393-8.477zM128 64v49.201c0 8.158-8.645 14.799-19.2 14.799H19.2C8.651 128 0 121.359 0 113.201V64c0-8.153 8.645-14.799 19.2-14.799h89.6c10.555 0 19.2 6.646 19.2 14.799z"/></svg>', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222572, 1157235318189994467, 1157235320526222563, 'table.svg', '<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M.006.064h127.988v31.104H.006V.064zm0 38.016h38.396v41.472H.006V38.08zm0 48.384h38.396v41.472H.006V86.464zM44.802 38.08h38.396v41.472H44.802V38.08zm0 48.384h38.396v41.472H44.802V86.464zM89.598 38.08h38.396v41.472H89.598zm0 48.384h38.396v41.472H89.598z"/><path d="M.006.064h127.988v31.104H.006V.064zm0 38.016h38.396v41.472H.006V38.08zm0 48.384h38.396v41.472H.006V86.464zM44.802 38.08h38.396v41.472H44.802V38.08zm0 48.384h38.396v41.472H44.802V86.464zM89.598 38.08h38.396v41.472H89.598zm0 48.384h38.396v41.472H89.598z"/></svg>', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222573, 1157235318189994467, 1157235320526222563, 'tree.svg', '<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M126.713 90.023c.858.985 1.287 2.134 1.287 3.447v29.553c0 1.423-.429 2.6-1.287 3.53-.858.93-1.907 1.395-3.146 1.395H97.824c-1.145 0-2.146-.465-3.004-1.395-.858-.93-1.287-2.107-1.287-3.53V93.47c0-.875.19-1.696.572-2.462.382-.766.906-1.368 1.573-1.806a3.84 3.84 0 0 1 2.146-.657h9.725V69.007a3.84 3.84 0 0 0-.43-1.806 3.569 3.569 0 0 0-1.143-1.313 2.714 2.714 0 0 0-1.573-.492h-36.47v23.149h9.725c1.144 0 2.145.492 3.004 1.478.858.985 1.287 2.134 1.287 3.447v29.553c0 .876-.191 1.696-.573 2.463-.38.766-.905 1.368-1.573 1.806a3.84 3.84 0 0 1-2.145.656H51.915a3.84 3.84 0 0 1-2.145-.656c-.668-.438-1.216-1.04-1.645-1.806a4.96 4.96 0 0 1-.644-2.463V93.47c0-1.313.43-2.462 1.288-3.447.858-.986 1.907-1.478 3.146-1.478h9.582v-23.15h-37.9c-.953 0-1.74.356-2.359 1.068-.62.711-.93 1.56-.93 2.544v19.538h9.726c1.239 0 2.264.492 3.074 1.478.81.985 1.216 2.134 1.216 3.447v29.553c0 1.423-.405 2.6-1.216 3.53-.81.93-1.835 1.395-3.074 1.395H4.29c-.476 0-.93-.082-1.358-.246a4.1 4.1 0 0 1-1.144-.657 4.658 4.658 0 0 1-.93-1.067 5.186 5.186 0 0 1-.643-1.395 5.566 5.566 0 0 1-.215-1.56V93.47c0-.437.048-.875.143-1.313a3.95 3.95 0 0 1 .429-1.15c.19-.328.429-.656.715-.984.286-.329.572-.602.858-.821.286-.22.62-.383 1.001-.493.382-.11.763-.164 1.144-.164h9.726V61.619c0-.985.31-1.833.93-2.544.619-.712 1.358-1.068 2.216-1.068h44.335V39.62h-9.582c-1.24 0-2.288-.492-3.146-1.477a5.09 5.09 0 0 1-1.287-3.448V5.14c0-1.423.429-2.627 1.287-3.612.858-.985 1.907-1.477 3.146-1.477h25.743c.763 0 1.478.246 2.145.739a5.17 5.17 0 0 1 1.573 1.888c.382.766.573 1.587.573 2.462v29.553c0 1.313-.43 2.463-1.287 3.448-.859.985-1.86 1.477-3.004 1.477h-9.725v18.389h42.762c.954 0 1.74.355 2.36 1.067.62.711.93 1.56.93 2.545v26.925h9.582c1.239 0 2.288.492 3.146 1.478z"/></svg>', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222574, 1157235318189994467, 1157235320526222563, 'user.svg', '<svg width="130" height="130" xmlns="http://www.w3.org/2000/svg"><path d="M63.444 64.996c20.633 0 37.359-14.308 37.359-31.953 0-17.649-16.726-31.952-37.359-31.952-20.631 0-37.36 14.303-37.358 31.952 0 17.645 16.727 31.953 37.359 31.953zM80.57 75.65H49.434c-26.652 0-48.26 18.477-48.26 41.27v2.664c0 9.316 21.608 9.325 48.26 9.325H80.57c26.649 0 48.256-.344 48.256-9.325v-2.663c0-22.794-21.605-41.271-48.256-41.271z" stroke="#979797"/></svg>', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222575, 1157235318189994467, 1157235320526222561, 'svgo.yml', '# replace default config

# multipass: true
# full: true

plugins:

  # - name
  #
  # or:
  # - name: false
  # - name: true
  #
  # or:
  # - name:
  #     param1: 1
  #     param2: 2

- removeAttrs:
    attrs:
      - ''fill''
      - ''fill-rule''
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222576, 1157235318189994467, 1157235320526222545, 'layout', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222577, 1157235318189994467, 1157235320526222576, 'components', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222578, 1157235318189994467, 1157235320526222577, 'AppMain.vue', '<template>
  <section class="app-main">
    <transition name="fade-transform" mode="out-in">
      <router-view :key="key" />
    </transition>
  </section>
</template>

<script>
export default {
  name: ''AppMain'',
  computed: {
    key() {
      return this.$route.path
    }
  }
}
</script>

<style scoped>
.app-main {
  /*50 = navbar  */
  min-height: calc(100vh - 50px);
  width: 100%;
  position: relative;
  overflow: hidden;
}
.fixed-header+.app-main {
  padding-top: 50px;
}
</style>

<style lang="scss">
// fix css style bug in open el-dialog
.el-popup-parent--hidden {
  .fixed-header {
    padding-right: 15px;
  }
}
</style>
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222579, 1157235318189994467, 1157235320526222577, 'index.js', 'export { default as Navbar } from ''./Navbar''
export { default as Sidebar } from ''./Sidebar''
export { default as AppMain } from ''./AppMain''
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222580, 1157235318189994467, 1157235320526222577, 'Navbar.vue', '<template>
  <div class="navbar">
    <hamburger :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />

    <breadcrumb class="breadcrumb-container" />

    <div class="right-menu">
      <el-dropdown class="avatar-container" trigger="click">
        <div class="avatar-wrapper">
          <img :src="avatar+''?imageView2/1/w/80/h/80''" class="user-avatar">
          <i class="el-icon-caret-bottom" />
        </div>
        <el-dropdown-menu slot="dropdown" class="user-dropdown">
          <router-link to="/">
            <el-dropdown-item>
              Home
            </el-dropdown-item>
          </router-link>
          <a target="_blank" href="https://github.com/PanJiaChen/vue-admin-template/">
            <el-dropdown-item>Github</el-dropdown-item>
          </a>
          <a target="_blank" href="https://panjiachen.github.io/vue-element-admin-site/#/">
            <el-dropdown-item>Docs</el-dropdown-item>
          </a>
          <el-dropdown-item divided>
            <span style="display:block;" @click="logout">Log Out</span>
          </el-dropdown-item>
        </el-dropdown-menu>
      </el-dropdown>
    </div>
  </div>
</template>

<script>
import { mapGetters } from ''vuex''
import Breadcrumb from ''@/components/Breadcrumb''
import Hamburger from ''@/components/Hamburger''

export default {
  components: {
    Breadcrumb,
    Hamburger
  },
  computed: {
    ...mapGetters([
      ''sidebar'',
      ''avatar''
    ])
  },
  methods: {
    toggleSideBar() {
      this.$store.dispatch(''app/toggleSideBar'')
    },
    async logout() {
      await this.$store.dispatch(''user/logout'')
      this.$router.push(`/login?redirect=${this.$route.fullPath}`)
    }
  }
}
</script>

<style lang="scss" scoped>
.navbar {
  height: 50px;
  overflow: hidden;
  position: relative;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,21,41,.08);

  .hamburger-container {
    line-height: 46px;
    height: 100%;
    float: left;
    cursor: pointer;
    transition: background .3s;
    -webkit-tap-highlight-color:transparent;

    &:hover {
      background: rgba(0, 0, 0, .025)
    }
  }

  .breadcrumb-container {
    float: left;
  }

  .right-menu {
    float: right;
    height: 100%;
    line-height: 50px;

    &:focus {
      outline: none;
    }

    .right-menu-item {
      display: inline-block;
      padding: 0 8px;
      height: 100%;
      font-size: 18px;
      color: #5a5e66;
      vertical-align: text-bottom;

      &.hover-effect {
        cursor: pointer;
        transition: background .3s;

        &:hover {
          background: rgba(0, 0, 0, .025)
        }
      }
    }

    .avatar-container {
      margin-right: 30px;

      .avatar-wrapper {
        margin-top: 5px;
        position: relative;

        .user-avatar {
          cursor: pointer;
          width: 40px;
          height: 40px;
          border-radius: 10px;
        }

        .el-icon-caret-bottom {
          cursor: pointer;
          position: absolute;
          right: -20px;
          top: 25px;
          font-size: 12px;
        }
      }
    }
  }
}
</style>
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222581, 1157235318189994467, 1157235320526222577, 'Sidebar', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222582, 1157235318189994467, 1157235320526222581, 'FixiOSBug.js', 'export default {
  computed: {
    device() {
      return this.$store.state.app.device
    }
  },
  mounted() {
    // In order to fix the click on menu on the ios device will trigger the mouseleave bug
    // https://github.com/PanJiaChen/vue-element-admin/issues/1135
    this.fixBugIniOS()
  },
  methods: {
    fixBugIniOS() {
      const $subMenu = this.$refs.subMenu
      if ($subMenu) {
        const handleMouseleave = $subMenu.handleMouseleave
        $subMenu.handleMouseleave = (e) => {
          if (this.device === ''mobile'') {
            return
          }
          handleMouseleave(e)
        }
      }
    }
  }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222583, 1157235318189994467, 1157235320526222581, 'index.vue', '<template>
  <div :class="{''has-logo'':showLogo}">
    <logo v-if="showLogo" :collapse="isCollapse" />
    <el-scrollbar wrap-class="scrollbar-wrapper">
      <el-menu
        :default-active="activeMenu"
        :collapse="isCollapse"
        :background-color="variables.menuBg"
        :text-color="variables.menuText"
        :unique-opened="false"
        :active-text-color="variables.menuActiveText"
        :collapse-transition="false"
        mode="vertical"
      >
        <sidebar-item v-for="route in routes" :key="route.path" :item="route" :base-path="route.path" />
      </el-menu>
    </el-scrollbar>
  </div>
</template>

<script>
import { mapGetters } from ''vuex''
import Logo from ''./Logo''
import SidebarItem from ''./SidebarItem''
import variables from ''@/styles/variables.scss''

export default {
  components: { SidebarItem, Logo },
  computed: {
    ...mapGetters([
      ''sidebar''
    ]),
    routes() {
      return this.$router.options.routes
    },
    activeMenu() {
      const route = this.$route
      const { meta, path } = route
      // if set path, the sidebar will highlight the path you set
      if (meta.activeMenu) {
        return meta.activeMenu
      }
      return path
    },
    showLogo() {
      return this.$store.state.settings.sidebarLogo
    },
    variables() {
      return variables
    },
    isCollapse() {
      return !this.sidebar.opened
    }
  }
}
</script>
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222584, 1157235318189994467, 1157235320526222581, 'Item.vue', '<script>
export default {
  name: ''MenuItem'',
  functional: true,
  props: {
    icon: {
      type: String,
      default: ''''
    },
    title: {
      type: String,
      default: ''''
    }
  },
  render(h, context) {
    const { icon, title } = context.props
    const vnodes = []

    if (icon) {
      vnodes.push(<svg-icon icon-class={icon}/>)
    }

    if (title) {
      vnodes.push(<span slot=''title''>{(title)}</span>)
    }
    return vnodes
  }
}
</script>
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222585, 1157235318189994467, 1157235320526222581, 'Link.vue', '
<template>
  <!-- eslint-disable vue/require-component-is -->
  <component v-bind="linkProps(to)">
    <slot />
  </component>
</template>

<script>
import { isExternal } from ''@/utils/validate''

export default {
  props: {
    to: {
      type: String,
      required: true
    }
  },
  methods: {
    linkProps(url) {
      if (isExternal(url)) {
        return {
          is: ''a'',
          href: url,
          target: ''_blank'',
          rel: ''noopener''
        }
      }
      return {
        is: ''router-link'',
        to: url
      }
    }
  }
}
</script>
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222586, 1157235318189994467, 1157235320526222581, 'Logo.vue', '<template>
  <div class="sidebar-logo-container" :class="{''collapse'':collapse}">
    <transition name="sidebarLogoFade">
      <router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
        <img v-if="logo" :src="logo" class="sidebar-logo">
        <h1 v-else class="sidebar-title">{{ title }} </h1>
      </router-link>
      <router-link v-else key="expand" class="sidebar-logo-link" to="/">
        <img v-if="logo" :src="logo" class="sidebar-logo">
        <h1 class="sidebar-title">{{ title }} </h1>
      </router-link>
    </transition>
  </div>
</template>

<script>
export default {
  name: ''SidebarLogo'',
  props: {
    collapse: {
      type: Boolean,
      required: true
    }
  },
  data() {
    return {
      title: ''Vue Admin Template'',
      logo: ''https://wpimg.wallstcn.com/69a1c46c-eb1c-4b46-8bd4-e9e686ef5251.png''
    }
  }
}
</script>

<style lang="scss" scoped>
.sidebarLogoFade-enter-active {
  transition: opacity 1.5s;
}

.sidebarLogoFade-enter,
.sidebarLogoFade-leave-to {
  opacity: 0;
}

.sidebar-logo-container {
  position: relative;
  width: 100%;
  height: 50px;
  line-height: 50px;
  background: #2b2f3a;
  text-align: center;
  overflow: hidden;

  & .sidebar-logo-link {
    height: 100%;
    width: 100%;

    & .sidebar-logo {
      width: 32px;
      height: 32px;
      vertical-align: middle;
      margin-right: 12px;
    }

    & .sidebar-title {
      display: inline-block;
      margin: 0;
      color: #fff;
      font-weight: 600;
      line-height: 50px;
      font-size: 14px;
      font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
      vertical-align: middle;
    }
  }

  &.collapse {
    .sidebar-logo {
      margin-right: 0px;
    }
  }
}
</style>
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222587, 1157235318189994467, 1157235320526222581, 'SidebarItem.vue', '<template>
  <div v-if="!item.hidden" class="menu-wrapper">
    <template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
      <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
        <el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{''submenu-title-noDropdown'':!isNest}">
          <item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
        </el-menu-item>
      </app-link>
    </template>

    <el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
      <template slot="title">
        <item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
      </template>
      <sidebar-item
        v-for="child in item.children"
        :key="child.path"
        :is-nest="true"
        :item="child"
        :base-path="resolvePath(child.path)"
        class="nest-menu"
      />
    </el-submenu>
  </div>
</template>

<script>
import path from ''path''
import { isExternal } from ''@/utils/validate''
import Item from ''./Item''
import AppLink from ''./Link''
import FixiOSBug from ''./FixiOSBug''

export default {
  name: ''SidebarItem'',
  components: { Item, AppLink },
  mixins: [FixiOSBug],
  props: {
    // route object
    item: {
      type: Object,
      required: true
    },
    isNest: {
      type: Boolean,
      default: false
    },
    basePath: {
      type: String,
      default: ''''
    }
  },
  data() {
    // To fix https://github.com/PanJiaChen/vue-admin-template/issues/237
    // TODO: refactor with render function
    this.onlyOneChild = null
    return {}
  },
  methods: {
    hasOneShowingChild(children = [], parent) {
      const showingChildren = children.filter(item => {
        if (item.hidden) {
          return false
        } else {
          // Temp set(will be used if only has one showing child)
          this.onlyOneChild = item
          return true
        }
      })

      // When there is only one child router, the child router is displayed by default
      if (showingChildren.length === 1) {
        return true
      }

      // Show parent if there are no child router to display
      if (showingChildren.length === 0) {
        this.onlyOneChild = { ... parent, path: '''', noShowingChildren: true }
        return true
      }

      return false
    },
    resolvePath(routePath) {
      if (isExternal(routePath)) {
        return routePath
      }
      if (isExternal(this.basePath)) {
        return this.basePath
      }
      return path.resolve(this.basePath, routePath)
    }
  }
}
</script>
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222588, 1157235318189994467, 1157235320526222576, 'index.vue', '<template>
  <div :class="classObj" class="app-wrapper">
    <div v-if="device===''mobile''&&sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
    <sidebar class="sidebar-container" />
    <div class="main-container">
      <div :class="{''fixed-header'':fixedHeader}">
        <navbar />
      </div>
      <app-main />
    </div>
  </div>
</template>

<script>
import { Navbar, Sidebar, AppMain } from ''./components''
import ResizeMixin from ''./mixin/ResizeHandler''

export default {
  name: ''Layout'',
  components: {
    Navbar,
    Sidebar,
    AppMain
  },
  mixins: [ResizeMixin],
  computed: {
    sidebar() {
      return this.$store.state.app.sidebar
    },
    device() {
      return this.$store.state.app.device
    },
    fixedHeader() {
      return this.$store.state.settings.fixedHeader
    },
    classObj() {
      return {
        hideSidebar: !this.sidebar.opened,
        openSidebar: this.sidebar.opened,
        withoutAnimation: this.sidebar.withoutAnimation,
        mobile: this.device === ''mobile''
      }
    }
  },
  methods: {
    handleClickOutside() {
      this.$store.dispatch(''app/closeSideBar'', { withoutAnimation: false })
    }
  }
}
</script>

<style lang="scss" scoped>
  @import "~@/styles/mixin.scss";
  @import "~@/styles/variables.scss";

  .app-wrapper {
    @include clearfix;
    position: relative;
    height: 100%;
    width: 100%;
    &.mobile.openSidebar{
      position: fixed;
      top: 0;
    }
  }
  .drawer-bg {
    background: #000;
    opacity: 0.3;
    width: 100%;
    top: 0;
    height: 100%;
    position: absolute;
    z-index: 999;
  }

  .fixed-header {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 9;
    width: calc(100% - #{$sideBarWidth});
    transition: width 0.28s;
  }

  .hideSidebar .fixed-header {
    width: calc(100% - 54px)
  }

  .mobile .fixed-header {
    width: 100%;
  }
</style>
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222589, 1157235318189994467, 1157235320526222576, 'mixin', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222590, 1157235318189994467, 1157235320526222589, 'ResizeHandler.js', 'import store from ''@/store''

const { body } = document
const WIDTH = 992 // refer to Bootstrap''s responsive design

export default {
  watch: {
    $route(route) {
      if (this.device === ''mobile'' && this.sidebar.opened) {
        store.dispatch(''app/closeSideBar'', { withoutAnimation: false })
      }
    }
  },
  beforeMount() {
    window.addEventListener(''resize'', this.$_resizeHandler)
  },
  beforeDestroy() {
    window.removeEventListener(''resize'', this.$_resizeHandler)
  },
  mounted() {
    const isMobile = this.$_isMobile()
    if (isMobile) {
      store.dispatch(''app/toggleDevice'', ''mobile'')
      store.dispatch(''app/closeSideBar'', { withoutAnimation: true })
    }
  },
  methods: {
    // use $_ for mixins properties
    // https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential
    $_isMobile() {
      const rect = body.getBoundingClientRect()
      return rect.width - 1 < WIDTH
    },
    $_resizeHandler() {
      if (!document.hidden) {
        const isMobile = this.$_isMobile()
        store.dispatch(''app/toggleDevice'', isMobile ? ''mobile'' : ''desktop'')

        if (isMobile) {
          store.dispatch(''app/closeSideBar'', { withoutAnimation: true })
        }
      }
    }
  }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222591, 1157235318189994467, 1157235320526222545, 'main.js', 'import Vue from ''vue''

import ''normalize.css/normalize.css'' // A modern alternative to CSS resets

import ElementUI from ''element-ui''
import ''element-ui/lib/theme-chalk/index.css''
import locale from ''element-ui/lib/locale/lang/en'' // lang i18n

import ''@/styles/index.scss'' // global css

import App from ''./App''
import store from ''./store''
import router from ''./router''

import ''@/icons'' // icon
import ''@/permission'' // permission control

/**
 * If you don''t want to use mock-server
 * you want to use MockJs for mock api
 * you can execute: mockXHR()
 *
 * Currently MockJs will be used in the production environment,
 * please remove it before going online! ! !
 */
import { mockXHR } from ''../mock''
if (process.env.NODE_ENV === ''production'') {
  mockXHR()
}

// set ElementUI lang to EN
Vue.use(ElementUI, { locale })

Vue.config.productionTip = false

new Vue({
  el: ''#app'',
  router,
  store,
  render: h => h(App)
})
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222592, 1157235318189994467, 1157235320526222545, 'permission.js', 'import router from ''./router''
import store from ''./store''
import { Message } from ''element-ui''
import NProgress from ''nprogress'' // progress bar
import ''nprogress/nprogress.css'' // progress bar style
import { getToken } from ''@/utils/auth'' // get token from cookie
import getPageTitle from ''@/utils/get-page-title''

NProgress.configure({ showSpinner: false }) // NProgress Configuration

const whiteList = [''/login''] // no redirect whitelist

router.beforeEach(async(to, from, next) => {
  // start progress bar
  NProgress.start()

  // set page title
  document.title = getPageTitle(to.meta.title)

  // determine whether the user has logged in
  const hasToken = getToken()

  if (hasToken) {
    if (to.path === ''/login'') {
      // if is logged in, redirect to the home page
      next({ path: ''/'' })
      NProgress.done()
    } else {
      const hasGetUserInfo = store.getters.name
      if (hasGetUserInfo) {
        next()
      } else {
        try {
          // get user info
          await store.dispatch(''user/getInfo'')

          next()
        } catch (error) {
          // remove token and go to login page to re-login
          await store.dispatch(''user/resetToken'')
          Message.error(error || ''Has Error'')
          next(`/login?redirect=${to.path}`)
          NProgress.done()
        }
      }
    }
  } else {
    /* has no token*/

    if (whiteList.indexOf(to.path) !== -1) {
      // in the free login whitelist, go directly
      next()
    } else {
      // other pages that do not have permission to access are redirected to the login page.
      next(`/login?redirect=${to.path}`)
      NProgress.done()
    }
  }
})

router.afterEach(() => {
  // finish progress bar
  NProgress.done()
})
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222593, 1157235318189994467, 1157235320526222545, 'router', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222594, 1157235318189994467, 1157235320526222593, 'index.js', 'import Vue from ''vue''
import Router from ''vue-router''

Vue.use(Router)

/* Layout */
import Layout from ''@/layout''

/**
 * Note: sub-menu only appear when route children.length >= 1
 * Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
 *
 * hidden: true                   if set true, item will not show in the sidebar(default is false)
 * alwaysShow: true               if set true, will always show the root menu
 *                                if not set alwaysShow, when item has more than one children route,
 *                                it will becomes nested mode, otherwise not show the root menu
 * redirect: noRedirect           if set noRedirect will no redirect in the breadcrumb
 * name:''router-name''             the name is used by <keep-alive> (must set!!!)
 * meta : {
    roles: [''admin'',''editor'']    control the page roles (you can set multiple roles)
    title: ''title''               the name show in sidebar and breadcrumb (recommend set)
    icon: ''svg-name''             the icon show in the sidebar
    breadcrumb: false            if set false, the item will hidden in breadcrumb(default is true)
    activeMenu: ''/example/list''  if set path, the sidebar will highlight the path you set
  }
 */

/**
 * constantRoutes
 * a base page that does not have permission requirements
 * all roles can be accessed
 */
export const constantRoutes = [
  {
    path: ''/login'',
    component: () => import(''@/views/login/index''),
    hidden: true
  },

  {
    path: ''/404'',
    component: () => import(''@/views/404''),
    hidden: true
  },

  {
    path: ''/'',
    component: Layout,
    redirect: ''/dashboard'',
    children: [{
      path: ''dashboard'',
      name: ''Dashboard'',
      component: () => import(''@/views/dashboard/index''),
      meta: { title: ''Dashboard'', icon: ''dashboard'' }
    }]
  },

  {
    path: ''/example'',
    component: Layout,
    redirect: ''/example/table'',
    name: ''Example'',
    meta: { title: ''Example'', icon: ''example'' },
    children: [
      {
        path: ''table'',
        name: ''Table'',
        component: () => import(''@/views/table/index''),
        meta: { title: ''Table'', icon: ''table'' }
      },
      {
        path: ''tree'',
        name: ''Tree'',
        component: () => import(''@/views/tree/index''),
        meta: { title: ''Tree'', icon: ''tree'' }
      }
    ]
  },

  {
    path: ''/form'',
    component: Layout,
    children: [
      {
        path: ''index'',
        name: ''Form'',
        component: () => import(''@/views/form/index''),
        meta: { title: ''Form'', icon: ''form'' }
      }
    ]
  },

  {
    path: ''/nested'',
    component: Layout,
    redirect: ''/nested/menu1'',
    name: ''Nested'',
    meta: {
      title: ''Nested'',
      icon: ''nested''
    },
    children: [
      {
        path: ''menu1'',
        component: () => import(''@/views/nested/menu1/index''), // Parent router-view
        name: ''Menu1'',
        meta: { title: ''Menu1'' },
        children: [
          {
            path: ''menu1-1'',
            component: () => import(''@/views/nested/menu1/menu1-1''),
            name: ''Menu1-1'',
            meta: { title: ''Menu1-1'' }
          },
          {
            path: ''menu1-2'',
            component: () => import(''@/views/nested/menu1/menu1-2''),
            name: ''Menu1-2'',
            meta: { title: ''Menu1-2'' },
            children: [
              {
                path: ''menu1-2-1'',
                component: () => import(''@/views/nested/menu1/menu1-2/menu1-2-1''),
                name: ''Menu1-2-1'',
                meta: { title: ''Menu1-2-1'' }
              },
              {
                path: ''menu1-2-2'',
                component: () => import(''@/views/nested/menu1/menu1-2/menu1-2-2''),
                name: ''Menu1-2-2'',
                meta: { title: ''Menu1-2-2'' }
              }
            ]
          },
          {
            path: ''menu1-3'',
            component: () => import(''@/views/nested/menu1/menu1-3''),
            name: ''Menu1-3'',
            meta: { title: ''Menu1-3'' }
          }
        ]
      },
      {
        path: ''menu2'',
        component: () => import(''@/views/nested/menu2/index''),
        meta: { title: ''menu2'' }
      }
    ]
  },

  {
    path: ''external-link'',
    component: Layout,
    children: [
      {
        path: ''https://panjiachen.github.io/vue-element-admin-site/#/'',
        meta: { title: ''External Link'', icon: ''link'' }
      }
    ]
  },

  // 404 page must be placed at the end !!!
  { path: ''*'', redirect: ''/404'', hidden: true }
]

const createRouter = () => new Router({
  // mode: ''history'', // require service support
  scrollBehavior: () => ({ y: 0 }),
  routes: constantRoutes
})

const router = createRouter()

// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
export function resetRouter() {
  const newRouter = createRouter()
  router.matcher = newRouter.matcher // reset router
}

export default router
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222595, 1157235318189994467, 1157235320526222545, 'settings.js', 'module.exports = {

  title: ''Vue Admin Template'',

  /**
   * @type {boolean} true | false
   * @description Whether fix the header
   */
  fixedHeader: false,

  /**
   * @type {boolean} true | false
   * @description Whether show the logo in sidebar
   */
  sidebarLogo: false
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222596, 1157235318189994467, 1157235320526222545, 'store', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222597, 1157235318189994467, 1157235320526222596, 'getters.js', 'const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  token: state => state.user.token,
  avatar: state => state.user.avatar,
  name: state => state.user.name
}
export default getters
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222598, 1157235318189994467, 1157235320526222596, 'index.js', 'import Vue from ''vue''
import Vuex from ''vuex''
import getters from ''./getters''
import app from ''./modules/app''
import settings from ''./modules/settings''
import user from ''./modules/user''

Vue.use(Vuex)

const store = new Vuex.Store({
  modules: {
    app,
    settings,
    user
  },
  getters
})

export default store
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222599, 1157235318189994467, 1157235320526222596, 'modules', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222600, 1157235318189994467, 1157235320526222599, 'app.js', 'import Cookies from ''js-cookie''

const state = {
  sidebar: {
    opened: Cookies.get(''sidebarStatus'') ? !!+Cookies.get(''sidebarStatus'') : true,
    withoutAnimation: false
  },
  device: ''desktop''
}

const mutations = {
  TOGGLE_SIDEBAR: state => {
    state.sidebar.opened = !state.sidebar.opened
    state.sidebar.withoutAnimation = false
    if (state.sidebar.opened) {
      Cookies.set(''sidebarStatus'', 1)
    } else {
      Cookies.set(''sidebarStatus'', 0)
    }
  },
  CLOSE_SIDEBAR: (state, withoutAnimation) => {
    Cookies.set(''sidebarStatus'', 0)
    state.sidebar.opened = false
    state.sidebar.withoutAnimation = withoutAnimation
  },
  TOGGLE_DEVICE: (state, device) => {
    state.device = device
  }
}

const actions = {
  toggleSideBar({ commit }) {
    commit(''TOGGLE_SIDEBAR'')
  },
  closeSideBar({ commit }, { withoutAnimation }) {
    commit(''CLOSE_SIDEBAR'', withoutAnimation)
  },
  toggleDevice({ commit }, device) {
    commit(''TOGGLE_DEVICE'', device)
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222601, 1157235318189994467, 1157235320526222599, 'settings.js', 'import defaultSettings from ''@/settings''

const { showSettings, fixedHeader, sidebarLogo } = defaultSettings

const state = {
  showSettings: showSettings,
  fixedHeader: fixedHeader,
  sidebarLogo: sidebarLogo
}

const mutations = {
  CHANGE_SETTING: (state, { key, value }) => {
    if (state.hasOwnProperty(key)) {
      state[key] = value
    }
  }
}

const actions = {
  changeSetting({ commit }, data) {
    commit(''CHANGE_SETTING'', data)
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}

', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222602, 1157235318189994467, 1157235320526222599, 'user.js', 'import { login, logout, getInfo } from ''@/api/user''
import { getToken, setToken, removeToken } from ''@/utils/auth''
import { resetRouter } from ''@/router''

const state = {
  token: getToken(),
  name: '''',
  avatar: ''''
}

const mutations = {
  SET_TOKEN: (state, token) => {
    state.token = token
  },
  SET_NAME: (state, name) => {
    state.name = name
  },
  SET_AVATAR: (state, avatar) => {
    state.avatar = avatar
  }
}

const actions = {
  // user login
  login({ commit }, userInfo) {
    const { username, password } = userInfo
    return new Promise((resolve, reject) => {
      login({ username: username.trim(), password: password }).then(response => {
        const { data } = response
        commit(''SET_TOKEN'', data.token)
        setToken(data.token)
        resolve()
      }).catch(error => {
        reject(error)
      })
    })
  },

  // get user info
  getInfo({ commit, state }) {
    return new Promise((resolve, reject) => {
      getInfo(state.token).then(response => {
        const { data } = response

        if (!data) {
          reject(''Verification failed, please Login again.'')
        }

        const { name, avatar } = data

        commit(''SET_NAME'', name)
        commit(''SET_AVATAR'', avatar)
        resolve(data)
      }).catch(error => {
        reject(error)
      })
    })
  },

  // user logout
  logout({ commit, state }) {
    return new Promise((resolve, reject) => {
      logout(state.token).then(() => {
        commit(''SET_TOKEN'', '''')
        removeToken()
        resetRouter()
        resolve()
      }).catch(error => {
        reject(error)
      })
    })
  },

  // remove token
  resetToken({ commit }) {
    return new Promise(resolve => {
      commit(''SET_TOKEN'', '''')
      removeToken()
      resolve()
    })
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}

', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222603, 1157235318189994467, 1157235320526222545, 'styles', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222604, 1157235318189994467, 1157235320526222603, 'element-ui.scss', '// cover some element-ui styles

.el-breadcrumb__inner,
.el-breadcrumb__inner a {
  font-weight: 400 !important;
}

.el-upload {
  input[type="file"] {
    display: none !important;
  }
}

.el-upload__input {
  display: none;
}


// to fixed https://github.com/ElemeFE/element/issues/2461
.el-dialog {
  transform: none;
  left: 0;
  position: relative;
  margin: 0 auto;
}

// refine element ui upload
.upload-container {
  .el-upload {
    width: 100%;

    .el-upload-dragger {
      width: 100%;
      height: 200px;
    }
  }
}

// dropdown
.el-dropdown-menu {
  a {
    display: block
  }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222605, 1157235318189994467, 1157235320526222603, 'index.scss', '@import ''./variables.scss'';
@import ''./mixin.scss'';
@import ''./transition.scss'';
@import ''./element-ui.scss'';
@import ''./sidebar.scss'';

body {
  height: 100%;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
}

label {
  font-weight: 700;
}

html {
  height: 100%;
  box-sizing: border-box;
}

#app {
  height: 100%;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

a:focus,
a:active {
  outline: none;
}

a,
a:focus,
a:hover {
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

div:focus {
  outline: none;
}

.clearfix {
  &:after {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: " ";
    clear: both;
    height: 0;
  }
}

// main-container global css
.app-container {
  padding: 20px;
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222606, 1157235318189994467, 1157235320526222603, 'mixin.scss', '@mixin clearfix {
  &:after {
    content: "";
    display: table;
    clear: both;
  }
}

@mixin scrollBar {
  &::-webkit-scrollbar-track-piece {
    background: #d3dce6;
  }

  &::-webkit-scrollbar {
    width: 6px;
  }

  &::-webkit-scrollbar-thumb {
    background: #99a9bf;
    border-radius: 20px;
  }
}

@mixin relative {
  position: relative;
  width: 100%;
  height: 100%;
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222607, 1157235318189994467, 1157235320526222603, 'sidebar.scss', '#app {

  .main-container {
    min-height: 100%;
    transition: margin-left .28s;
    margin-left: $sideBarWidth;
    position: relative;
  }

  .sidebar-container {
    transition: width 0.28s;
    width: $sideBarWidth !important;
    background-color: $menuBg;
    height: 100%;
    position: fixed;
    font-size: 0px;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1001;
    overflow: hidden;

    // reset element-ui css
    .horizontal-collapse-transition {
      transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
    }

    .scrollbar-wrapper {
      overflow-x: hidden !important;
    }

    .el-scrollbar__bar.is-vertical {
      right: 0px;
    }

    .el-scrollbar {
      height: 100%;
    }

    &.has-logo {
      .el-scrollbar {
        height: calc(100% - 50px);
      }
    }

    .is-horizontal {
      display: none;
    }

    a {
      display: inline-block;
      width: 100%;
      overflow: hidden;
    }

    .svg-icon {
      margin-right: 16px;
    }

    .el-menu {
      border: none;
      height: 100%;
      width: 100% !important;
    }

    // menu hover
    .submenu-title-noDropdown,
    .el-submenu__title {
      &:hover {
        background-color: $menuHover !important;
      }
    }

    .is-active>.el-submenu__title {
      color: $subMenuActiveText !important;
    }

    & .nest-menu .el-submenu>.el-submenu__title,
    & .el-submenu .el-menu-item {
      min-width: $sideBarWidth !important;
      background-color: $subMenuBg !important;

      &:hover {
        background-color: $subMenuHover !important;
      }
    }
  }

  .hideSidebar {
    .sidebar-container {
      width: 54px !important;
    }

    .main-container {
      margin-left: 54px;
    }

    .submenu-title-noDropdown {
      padding: 0 !important;
      position: relative;

      .el-tooltip {
        padding: 0 !important;

        .svg-icon {
          margin-left: 20px;
        }
      }
    }

    .el-submenu {
      overflow: hidden;

      &>.el-submenu__title {
        padding: 0 !important;

        .svg-icon {
          margin-left: 20px;
        }

        .el-submenu__icon-arrow {
          display: none;
        }
      }
    }

    .el-menu--collapse {
      .el-submenu {
        &>.el-submenu__title {
          &>span {
            height: 0;
            width: 0;
            overflow: hidden;
            visibility: hidden;
            display: inline-block;
          }
        }
      }
    }
  }

  .el-menu--collapse .el-menu .el-submenu {
    min-width: $sideBarWidth !important;
  }

  // mobile responsive
  .mobile {
    .main-container {
      margin-left: 0px;
    }

    .sidebar-container {
      transition: transform .28s;
      width: $sideBarWidth !important;
    }

    &.hideSidebar {
      .sidebar-container {
        pointer-events: none;
        transition-duration: 0.3s;
        transform: translate3d(-$sideBarWidth, 0, 0);
      }
    }
  }

  .withoutAnimation {

    .main-container,
    .sidebar-container {
      transition: none;
    }
  }
}

// when menu collapsed
.el-menu--vertical {
  &>.el-menu {
    .svg-icon {
      margin-right: 16px;
    }
  }

  .nest-menu .el-submenu>.el-submenu__title,
  .el-menu-item {
    &:hover {
      // you can use $subMenuHover
      background-color: $menuHover !important;
    }
  }

  // the scroll bar appears when the subMenu is too long
  >.el-menu--popup {
    max-height: 100vh;
    overflow-y: auto;

    &::-webkit-scrollbar-track-piece {
      background: #d3dce6;
    }

    &::-webkit-scrollbar {
      width: 6px;
    }

    &::-webkit-scrollbar-thumb {
      background: #99a9bf;
      border-radius: 20px;
    }
  }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222608, 1157235318189994467, 1157235320526222603, 'transition.scss', '// global transition css

/* fade */
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.28s;
}

.fade-enter,
.fade-leave-active {
  opacity: 0;
}

/* fade-transform */
.fade-transform-leave-active,
.fade-transform-enter-active {
  transition: all .5s;
}

.fade-transform-enter {
  opacity: 0;
  transform: translateX(-30px);
}

.fade-transform-leave-to {
  opacity: 0;
  transform: translateX(30px);
}

/* breadcrumb transition */
.breadcrumb-enter-active,
.breadcrumb-leave-active {
  transition: all .5s;
}

.breadcrumb-enter,
.breadcrumb-leave-active {
  opacity: 0;
  transform: translateX(20px);
}

.breadcrumb-move {
  transition: all .5s;
}

.breadcrumb-leave-active {
  position: absolute;
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222609, 1157235318189994467, 1157235320526222603, 'variables.scss', '// sidebar
$menuText:#bfcbd9;
$menuActiveText:#409EFF;
$subMenuActiveText:#f4f4f5; //https://github.com/ElemeFE/element/issues/12951

$menuBg:#304156;
$menuHover:#263445;

$subMenuBg:#1f2d3d;
$subMenuHover:#001528;

$sideBarWidth: 210px;

// the :export directive is the magic sauce for webpack
// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
:export {
  menuText: $menuText;
  menuActiveText: $menuActiveText;
  subMenuActiveText: $subMenuActiveText;
  menuBg: $menuBg;
  menuHover: $menuHover;
  subMenuBg: $subMenuBg;
  subMenuHover: $subMenuHover;
  sideBarWidth: $sideBarWidth;
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222610, 1157235318189994467, 1157235320526222545, 'utils', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222611, 1157235318189994467, 1157235320526222610, 'auth.js', 'import Cookies from ''js-cookie''

const TokenKey = ''vue_admin_template_token''

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222612, 1157235318189994467, 1157235320526222610, 'get-page-title.js', 'import defaultSettings from ''@/settings''

const title = defaultSettings.title || ''Vue Admin Template''

export default function getPageTitle(pageTitle) {
  if (pageTitle) {
    return `${pageTitle} - ${title}`
  }
  return `${title}`
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222613, 1157235318189994467, 1157235320526222610, 'index.js', '/**
 * Created by PanJiaChen on 16/11/18.
 */

/**
 * Parse the time to string
 * @param {(Object|string|number)} time
 * @param {string} cFormat
 * @returns {string}
 */
export function parseTime(time, cFormat) {
  if (arguments.length === 0) {
    return null
  }
  const format = cFormat || ''{y}-{m}-{d} {h}:{i}:{s}''
  let date
  if (typeof time === ''object'') {
    date = time
  } else {
    if ((typeof time === ''string'') && (/^[0-9]+$/.test(time))) {
      time = parseInt(time)
    }
    if ((typeof time === ''number'') && (time.toString().length === 10)) {
      time = time * 1000
    }
    date = new Date(time)
  }
  const formatObj = {
    y: date.getFullYear(),
    m: date.getMonth() + 1,
    d: date.getDate(),
    h: date.getHours(),
    i: date.getMinutes(),
    s: date.getSeconds(),
    a: date.getDay()
  }
  const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
    let value = formatObj[key]
    // Note: getDay() returns 0 on Sunday
    if (key === ''a'') { return [''日'', ''一'', ''二'', ''三'', ''四'', ''五'', ''六''][value ] }
    if (result.length > 0 && value < 10) {
      value = ''0'' + value
    }
    return value || 0
  })
  return time_str
}

/**
 * @param {number} time
 * @param {string} option
 * @returns {string}
 */
export function formatTime(time, option) {
  if (('''' + time).length === 10) {
    time = parseInt(time) * 1000
  } else {
    time = +time
  }
  const d = new Date(time)
  const now = Date.now()

  const diff = (now - d) / 1000

  if (diff < 30) {
    return ''刚刚''
  } else if (diff < 3600) {
    // less 1 hour
    return Math.ceil(diff / 60) + ''分钟前''
  } else if (diff < 3600 * 24) {
    return Math.ceil(diff / 3600) + ''小时前''
  } else if (diff < 3600 * 24 * 2) {
    return ''1天前''
  }
  if (option) {
    return parseTime(time, option)
  } else {
    return (
      d.getMonth() +
      1 +
      ''月'' +
      d.getDate() +
      ''日'' +
      d.getHours() +
      ''时'' +
      d.getMinutes() +
      ''分''
    )
  }
}

/**
 * @param {string} url
 * @returns {Object}
 */
export function param2Obj(url) {
  const search = url.split(''?'')[1]
  if (!search) {
    return {}
  }
  return JSON.parse(
    ''{"'' +
      decodeURIComponent(search)
        .replace(/"/g, ''\\"'')
        .replace(/&/g, ''","'')
        .replace(/=/g, ''":"'')
        .replace(/\+/g, '' '') +
      ''"}''
  )
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222614, 1157235318189994467, 1157235320526222610, 'request.js', 'import axios from ''axios''
import { MessageBox, Message } from ''element-ui''
import store from ''@/store''
import { getToken } from ''@/utils/auth''

// create an axios instance
const service = axios.create({
  baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
  // withCredentials: true, // send cookies when cross-domain requests
  timeout: 5000 // request timeout
})

// request interceptor
service.interceptors.request.use(
  config => {
    // do something before request is sent

    if (store.getters.token) {
      // let each request carry token
      // [''X-Token''] is a custom headers key
      // please modify it according to the actual situation
      config.headers[''X-Token''] = getToken()
    }
    return config
  },
  error => {
    // do something with request error
    console.log(error) // for debug
    return Promise.reject(error)
  }
)

// response interceptor
service.interceptors.response.use(
  /**
   * If you want to get http information such as headers or status
   * Please return  response => response
  */

  /**
   * Determine the request status by custom code
   * Here is just an example
   * You can also judge the status by HTTP Status Code
   */
  response => {
    const res = response.data

    // if the custom code is not 20000, it is judged as an error.
    if (res.code !== 20000) {
      Message({
        message: res.message || ''Error'',
        type: ''error'',
        duration: 5 * 1000
      })

      // 50008: Illegal token; 50012: Other clients logged in; 50014: Token expired;
      if (res.code === 50008 || res.code === 50012 || res.code === 50014) {
        // to re-login
        MessageBox.confirm(''You have been logged out, you can cancel to stay on this page, or log in again'', ''Confirm logout'', {
          confirmButtonText: ''Re-Login'',
          cancelButtonText: ''Cancel'',
          type: ''warning''
        }).then(() => {
          store.dispatch(''user/resetToken'').then(() => {
            location.reload()
          })
        })
      }
      return Promise.reject(new Error(res.message || ''Error''))
    } else {
      return res
    }
  },
  error => {
    console.log(''err'' + error) // for debug
    Message({
      message: error.message,
      type: ''error'',
      duration: 5 * 1000
    })
    return Promise.reject(error)
  }
)

export default service
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222615, 1157235318189994467, 1157235320526222610, 'validate.js', '/**
 * Created by PanJiaChen on 16/11/18.
 */

/**
 * @param {string} path
 * @returns {Boolean}
 */
export function isExternal(path) {
  return /^(https?:|mailto:|tel:)/.test(path)
}

/**
 * @param {string} str
 * @returns {Boolean}
 */
export function validUsername(str) {
  const valid_map = [''admin'', ''editor'']
  return valid_map.indexOf(str.trim()) >= 0
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222616, 1157235318189994467, 1157235320526222545, 'views', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222617, 1157235318189994467, 1157235320526222616, '404.vue', '<template>
  <div class="wscn-http404-container">
    <div class="wscn-http404">
      <div class="pic-404">
        <img class="pic-404__parent" src="@/assets/404_images/404.png" alt="404">
        <img class="pic-404__child left" src="@/assets/404_images/404_cloud.png" alt="404">
        <img class="pic-404__child mid" src="@/assets/404_images/404_cloud.png" alt="404">
        <img class="pic-404__child right" src="@/assets/404_images/404_cloud.png" alt="404">
      </div>
      <div class="bullshit">
        <div class="bullshit__oops">OOPS!</div>
        <div class="bullshit__info">All rights reserved
          <a style="color:#20a0ff" href="https://wallstreetcn.com" target="_blank">wallstreetcn</a>
        </div>
        <div class="bullshit__headline">{{ message }}</div>
        <div class="bullshit__info">Please check that the URL you entered is correct, or click the button below to return to the homepage.</div>
        <a href="" class="bullshit__return-home">Back to home</a>
      </div>
    </div>
  </div>
</template>

<script>

export default {
  name: ''Page404'',
  computed: {
    message() {
      return ''The webmaster said that you can not enter this page...''
    }
  }
}
</script>

<style lang="scss" scoped>
.wscn-http404-container{
  transform: translate(-50%,-50%);
  position: absolute;
  top: 40%;
  left: 50%;
}
.wscn-http404 {
  position: relative;
  width: 1200px;
  padding: 0 50px;
  overflow: hidden;
  .pic-404 {
    position: relative;
    float: left;
    width: 600px;
    overflow: hidden;
    &__parent {
      width: 100%;
    }
    &__child {
      position: absolute;
      &.left {
        width: 80px;
        top: 17px;
        left: 220px;
        opacity: 0;
        animation-name: cloudLeft;
        animation-duration: 2s;
        animation-timing-function: linear;
        animation-fill-mode: forwards;
        animation-delay: 1s;
      }
      &.mid {
        width: 46px;
        top: 10px;
        left: 420px;
        opacity: 0;
        animation-name: cloudMid;
        animation-duration: 2s;
        animation-timing-function: linear;
        animation-fill-mode: forwards;
        animation-delay: 1.2s;
      }
      &.right {
        width: 62px;
        top: 100px;
        left: 500px;
        opacity: 0;
        animation-name: cloudRight;
        animation-duration: 2s;
        animation-timing-function: linear;
        animation-fill-mode: forwards;
        animation-delay: 1s;
      }
      @keyframes cloudLeft {
        0% {
          top: 17px;
          left: 220px;
          opacity: 0;
        }
        20% {
          top: 33px;
          left: 188px;
          opacity: 1;
        }
        80% {
          top: 81px;
          left: 92px;
          opacity: 1;
        }
        100% {
          top: 97px;
          left: 60px;
          opacity: 0;
        }
      }
      @keyframes cloudMid {
        0% {
          top: 10px;
          left: 420px;
          opacity: 0;
        }
        20% {
          top: 40px;
          left: 360px;
          opacity: 1;
        }
        70% {
          top: 130px;
          left: 180px;
          opacity: 1;
        }
        100% {
          top: 160px;
          left: 120px;
          opacity: 0;
        }
      }
      @keyframes cloudRight {
        0% {
          top: 100px;
          left: 500px;
          opacity: 0;
        }
        20% {
          top: 120px;
          left: 460px;
          opacity: 1;
        }
        80% {
          top: 180px;
          left: 340px;
          opacity: 1;
        }
        100% {
          top: 200px;
          left: 300px;
          opacity: 0;
        }
      }
    }
  }
  .bullshit {
    position: relative;
    float: left;
    width: 300px;
    padding: 30px 0;
    overflow: hidden;
    &__oops {
      font-size: 32px;
      font-weight: bold;
      line-height: 40px;
      color: #1482f0;
      opacity: 0;
      margin-bottom: 20px;
      animation-name: slideUp;
      animation-duration: 0.5s;
      animation-fill-mode: forwards;
    }
    &__headline {
      font-size: 20px;
      line-height: 24px;
      color: #222;
      font-weight: bold;
      opacity: 0;
      margin-bottom: 10px;
      animation-name: slideUp;
      animation-duration: 0.5s;
      animation-delay: 0.1s;
      animation-fill-mode: forwards;
    }
    &__info {
      font-size: 13px;
      line-height: 21px;
      color: grey;
      opacity: 0;
      margin-bottom: 30px;
      animation-name: slideUp;
      animation-duration: 0.5s;
      animation-delay: 0.2s;
      animation-fill-mode: forwards;
    }
    &__return-home {
      display: block;
      float: left;
      width: 110px;
      height: 36px;
      background: #1482f0;
      border-radius: 100px;
      text-align: center;
      color: #ffffff;
      opacity: 0;
      font-size: 14px;
      line-height: 36px;
      cursor: pointer;
      animation-name: slideUp;
      animation-duration: 0.5s;
      animation-delay: 0.3s;
      animation-fill-mode: forwards;
    }
    @keyframes slideUp {
      0% {
        transform: translateY(60px);
        opacity: 0;
      }
      100% {
        transform: translateY(0);
        opacity: 1;
      }
    }
  }
}
</style>
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222618, 1157235318189994467, 1157235320526222616, 'dashboard', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222619, 1157235318189994467, 1157235320526222618, 'index.vue', '<template>
  <div class="dashboard-container">
    <div class="dashboard-text">name: {{ name }}</div>
  </div>
</template>

<script>
import { mapGetters } from ''vuex''

export default {
  name: ''Dashboard'',
  computed: {
    ...mapGetters([
      ''name''
    ])
  }
}
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    margin: 30px;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
</style>
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222620, 1157235318189994467, 1157235320526222616, 'form', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222621, 1157235318189994467, 1157235320526222620, 'index.vue', '<template>
  <div class="app-container">
    <el-form ref="form" :model="form" label-width="120px">
      <el-form-item label="Activity name">
        <el-input v-model="form.name" />
      </el-form-item>
      <el-form-item label="Activity zone">
        <el-select v-model="form.region" placeholder="please select your zone">
          <el-option label="Zone one" value="shanghai" />
          <el-option label="Zone two" value="beijing" />
        </el-select>
      </el-form-item>
      <el-form-item label="Activity time">
        <el-col :span="11">
          <el-date-picker v-model="form.date1" type="date" placeholder="Pick a date" style="width: 100%;" />
        </el-col>
        <el-col :span="2" class="line">-</el-col>
        <el-col :span="11">
          <el-time-picker v-model="form.date2" type="fixed-time" placeholder="Pick a time" style="width: 100%;" />
        </el-col>
      </el-form-item>
      <el-form-item label="Instant delivery">
        <el-switch v-model="form.delivery" />
      </el-form-item>
      <el-form-item label="Activity type">
        <el-checkbox-group v-model="form.type">
          <el-checkbox label="Online activities" name="type" />
          <el-checkbox label="Promotion activities" name="type" />
          <el-checkbox label="Offline activities" name="type" />
          <el-checkbox label="Simple brand exposure" name="type" />
        </el-checkbox-group>
      </el-form-item>
      <el-form-item label="Resources">
        <el-radio-group v-model="form.resource">
          <el-radio label="Sponsor" />
          <el-radio label="Venue" />
        </el-radio-group>
      </el-form-item>
      <el-form-item label="Activity form">
        <el-input v-model="form.desc" type="textarea" />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">Create</el-button>
        <el-button @click="onCancel">Cancel</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {
        name: '''',
        region: '''',
        date1: '''',
        date2: '''',
        delivery: false,
        type: [],
        resource: '''',
        desc: ''''
      }
    }
  },
  methods: {
    onSubmit() {
      this.$message(''submit!'')
    },
    onCancel() {
      this.$message({
        message: ''cancel!'',
        type: ''warning''
      })
    }
  }
}
</script>

<style scoped>
.line{
  text-align: center;
}
</style>

', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222622, 1157235318189994467, 1157235320526222616, 'login', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222623, 1157235318189994467, 1157235320526222622, 'index.vue', '<template>
  <div class="login-container">
    <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on" label-position="left">

      <div class="title-container">
        <h3 class="title">Login Form</h3>
      </div>

      <el-form-item prop="username">
        <span class="svg-container">
          <svg-icon icon-class="user" />
        </span>
        <el-input
          ref="username"
          v-model="loginForm.username"
          placeholder="Username"
          name="username"
          type="text"
          tabindex="1"
          auto-complete="on"
        />
      </el-form-item>

      <el-form-item prop="password">
        <span class="svg-container">
          <svg-icon icon-class="password" />
        </span>
        <el-input
          :key="passwordType"
          ref="password"
          v-model="loginForm.password"
          :type="passwordType"
          placeholder="Password"
          name="password"
          tabindex="2"
          auto-complete="on"
          @keyup.enter.native="handleLogin"
        />
        <span class="show-pwd" @click="showPwd">
          <svg-icon :icon-class="passwordType === ''password'' ? ''eye'' : ''eye-open''" />
        </span>
      </el-form-item>

      <el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;" @click.native.prevent="handleLogin">Login</el-button>

      <div class="tips">
        <span style="margin-right:20px;">username: admin</span>
        <span> password: any</span>
      </div>

    </el-form>
  </div>
</template>

<script>
import { validUsername } from ''@/utils/validate''

export default {
  name: ''Login'',
  data() {
    const validateUsername = (rule, value, callback) => {
      if (!validUsername(value)) {
        callback(new Error(''Please enter the correct user name''))
      } else {
        callback()
      }
    }
    const validatePassword = (rule, value, callback) => {
      if (value.length < 6) {
        callback(new Error(''The password can not be less than 6 digits''))
      } else {
        callback()
      }
    }
    return {
      loginForm: {
        username: ''admin'',
        password: ''111111''
      },
      loginRules: {
        username: [{ required: true, trigger: ''blur'', validator: validateUsername }],
        password: [{ required: true, trigger: ''blur'', validator: validatePassword }]
      },
      loading: false,
      passwordType: ''password'',
      redirect: undefined
    }
  },
  watch: {
    $route: {
      handler: function(route) {
        this.redirect = route.query && route.query.redirect
      },
      immediate: true
    }
  },
  methods: {
    showPwd() {
      if (this.passwordType === ''password'') {
        this.passwordType = ''''
      } else {
        this.passwordType = ''password''
      }
      this.$nextTick(() => {
        this.$refs.password.focus()
      })
    },
    handleLogin() {
      this.$refs.loginForm.validate(valid => {
        if (valid) {
          this.loading = true
          this.$store.dispatch(''user/login'', this.loginForm).then(() => {
            this.$router.push({ path: this.redirect || ''/'' })
            this.loading = false
          }).catch(() => {
            this.loading = false
          })
        } else {
          console.log(''error submit!!'')
          return false
        }
      })
    }
  }
}
</script>

<style lang="scss">
/* 修复input 背景不协调 和光标变色 */
/* Detail see https://github.com/PanJiaChen/vue-element-admin/pull/927 */

$bg:#283443;
$light_gray:#fff;
$cursor: #fff;

@supports (-webkit-mask: none) and (not (cater-color: $cursor)) {
  .login-container .el-input input {
    color: $cursor;
  }
}

/* reset element-ui css */
.login-container {
  .el-input {
    display: inline-block;
    height: 47px;
    width: 85%;

    input {
      background: transparent;
      border: 0px;
      -webkit-appearance: none;
      border-radius: 0px;
      padding: 12px 5px 12px 15px;
      color: $light_gray;
      height: 47px;
      caret-color: $cursor;

      &:-webkit-autofill {
        box-shadow: 0 0 0px 1000px $bg inset !important;
        -webkit-text-fill-color: $cursor !important;
      }
    }
  }

  .el-form-item {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    color: #454545;
  }
}
</style>

<style lang="scss" scoped>
$bg:#2d3a4b;
$dark_gray:#889aa4;
$light_gray:#eee;

.login-container {
  min-height: 100%;
  width: 100%;
  background-color: $bg;
  overflow: hidden;

  .login-form {
    position: relative;
    width: 520px;
    max-width: 100%;
    padding: 160px 35px 0;
    margin: 0 auto;
    overflow: hidden;
  }

  .tips {
    font-size: 14px;
    color: #fff;
    margin-bottom: 10px;

    span {
      &:first-of-type {
        margin-right: 16px;
      }
    }
  }

  .svg-container {
    padding: 6px 5px 6px 15px;
    color: $dark_gray;
    vertical-align: middle;
    width: 30px;
    display: inline-block;
  }

  .title-container {
    position: relative;

    .title {
      font-size: 26px;
      color: $light_gray;
      margin: 0px auto 40px auto;
      text-align: center;
      font-weight: bold;
    }
  }

  .show-pwd {
    position: absolute;
    right: 10px;
    top: 7px;
    font-size: 16px;
    color: $dark_gray;
    cursor: pointer;
    user-select: none;
  }
}
</style>
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222624, 1157235318189994467, 1157235320526222616, 'nested', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222625, 1157235318189994467, 1157235320526222624, 'menu1', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222626, 1157235318189994467, 1157235320526222625, 'index.vue', '<template>
  <div style="padding:30px;">
    <el-alert :closable="false" title="menu 1">
      <router-view />
    </el-alert>
  </div>
</template>
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222627, 1157235318189994467, 1157235320526222625, 'menu1-1', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222628, 1157235318189994467, 1157235320526222627, 'index.vue', '<template>
  <div style="padding:30px;">
    <el-alert :closable="false" title="menu 1-1" type="success">
      <router-view />
    </el-alert>
  </div>
</template>
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222629, 1157235318189994467, 1157235320526222625, 'menu1-2', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222630, 1157235318189994467, 1157235320526222629, 'index.vue', '<template>
  <div style="padding:30px;">
    <el-alert :closable="false" title="menu 1-2" type="success">
      <router-view />
    </el-alert>
  </div>
</template>
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222631, 1157235318189994467, 1157235320526222629, 'menu1-2-1', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222632, 1157235318189994467, 1157235320526222631, 'index.vue', '<template functional>
  <div style="padding:30px;">
    <el-alert :closable="false" title="menu 1-2-1" type="warning" />
  </div>
</template>
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222633, 1157235318189994467, 1157235320526222629, 'menu1-2-2', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222634, 1157235318189994467, 1157235320526222633, 'index.vue', '<template functional>
  <div style="padding:30px;">
    <el-alert :closable="false" title="menu 1-2-2" type="warning" />
  </div>
</template>
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222635, 1157235318189994467, 1157235320526222625, 'menu1-3', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222636, 1157235318189994467, 1157235320526222635, 'index.vue', '<template functional>
  <div style="padding:30px;">
    <el-alert :closable="false" title="menu 1-3" type="success" />
  </div>
</template>
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222637, 1157235318189994467, 1157235320526222624, 'menu2', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222638, 1157235318189994467, 1157235320526222637, 'index.vue', '<template>
  <div style="padding:30px;">
    <el-alert :closable="false" title="menu 2" />
  </div>
</template>
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222639, 1157235318189994467, 1157235320526222616, 'table', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222640, 1157235318189994467, 1157235320526222639, 'index.vue', '<template>
  <div class="app-container">
    <el-table
      v-loading="listLoading"
      :data="list"
      element-loading-text="Loading"
      border
      fit
      highlight-current-row
    >
      <el-table-column align="center" label="ID" width="95">
        <template slot-scope="scope">
          {{ scope.$index }}
        </template>
      </el-table-column>
      <el-table-column label="Title">
        <template slot-scope="scope">
          {{ scope.row.title }}
        </template>
      </el-table-column>
      <el-table-column label="Author" width="110" align="center">
        <template slot-scope="scope">
          <span>{{ scope.row.author }}</span>
        </template>
      </el-table-column>
      <el-table-column label="Pageviews" width="110" align="center">
        <template slot-scope="scope">
          {{ scope.row.pageviews }}
        </template>
      </el-table-column>
      <el-table-column class-name="status-col" label="Status" width="110" align="center">
        <template slot-scope="scope">
          <el-tag :type="scope.row.status | statusFilter">{{ scope.row.status }}</el-tag>
        </template>
      </el-table-column>
      <el-table-column align="center" prop="created_at" label="Display_time" width="200">
        <template slot-scope="scope">
          <i class="el-icon-time" />
          <span>{{ scope.row.display_time }}</span>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import { getList } from ''@/api/table''

export default {
  filters: {
    statusFilter(status) {
      const statusMap = {
        published: ''success'',
        draft: ''gray'',
        deleted: ''danger''
      }
      return statusMap[status]
    }
  },
  data() {
    return {
      list: null,
      listLoading: true
    }
  },
  created() {
    this.fetchData()
  },
  methods: {
    fetchData() {
      this.listLoading = true
      getList().then(response => {
        this.list = response.data.items
        this.listLoading = false
      })
    }
  }
}
</script>
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222641, 1157235318189994467, 1157235320526222616, 'tree', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222642, 1157235318189994467, 1157235320526222641, 'index.vue', '<template>
  <div class="app-container">
    <el-input v-model="filterText" placeholder="Filter keyword" style="margin-bottom:30px;" />

    <el-tree
      ref="tree2"
      :data="data2"
      :props="defaultProps"
      :filter-node-method="filterNode"
      class="filter-tree"
      default-expand-all
    />

  </div>
</template>

<script>
export default {

  data() {
    return {
      filterText: '''',
      data2: [{
        id: 1,
        label: ''Level one 1'',
        children: [{
          id: 4,
          label: ''Level two 1-1'',
          children: [{
            id: 9,
            label: ''Level three 1-1-1''
          }, {
            id: 10,
            label: ''Level three 1-1-2''
          }]
        }]
      }, {
        id: 2,
        label: ''Level one 2'',
        children: [{
          id: 5,
          label: ''Level two 2-1''
        }, {
          id: 6,
          label: ''Level two 2-2''
        }]
      }, {
        id: 3,
        label: ''Level one 3'',
        children: [{
          id: 7,
          label: ''Level two 3-1''
        }, {
          id: 8,
          label: ''Level two 3-2''
        }]
      }],
      defaultProps: {
        children: ''children'',
        label: ''label''
      }
    }
  },
  watch: {
    filterText(val) {
      this.$refs.tree2.filter(val)
    }
  },

  methods: {
    filterNode(value, data) {
      if (!value) return true
      return data.label.indexOf(value) !== -1
    }
  }
}
</script>

', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222643, 1157235318189994467, 0, 'tests', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222644, 1157235318189994467, 1157235320526222643, 'unit', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222645, 1157235318189994467, 1157235320526222644, '.eslintrc.js', 'module.exports = {
  env: {
    jest: true
  }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222646, 1157235318189994467, 1157235320526222644, 'components', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222647, 1157235318189994467, 1157235320526222646, 'Breadcrumb.spec.js', 'import { mount, createLocalVue } from ''@vue/test-utils''
import VueRouter from ''vue-router''
import ElementUI from ''element-ui''
import Breadcrumb from ''@/components/Breadcrumb/index.vue''

const localVue = createLocalVue()
localVue.use(VueRouter)
localVue.use(ElementUI)

const routes = [
  {
    path: ''/'',
    name: ''home'',
    children: [{
      path: ''dashboard'',
      name: ''dashboard''
    }]
  },
  {
    path: ''/menu'',
    name: ''menu'',
    children: [{
      path: ''menu1'',
      name: ''menu1'',
      meta: { title: ''menu1'' },
      children: [{
        path: ''menu1-1'',
        name: ''menu1-1'',
        meta: { title: ''menu1-1'' }
      },
      {
        path: ''menu1-2'',
        name: ''menu1-2'',
        redirect: ''noredirect'',
        meta: { title: ''menu1-2'' },
        children: [{
          path: ''menu1-2-1'',
          name: ''menu1-2-1'',
          meta: { title: ''menu1-2-1'' }
        },
        {
          path: ''menu1-2-2'',
          name: ''menu1-2-2''
        }]
      }]
    }]
  }]

const router = new VueRouter({
  routes
})

describe(''Breadcrumb.vue'', () => {
  const wrapper = mount(Breadcrumb, {
    localVue,
    router
  })
  it(''dashboard'', () => {
    router.push(''/dashboard'')
    const len = wrapper.findAll(''.el-breadcrumb__inner'').length
    expect(len).toBe(1)
  })
  it(''normal route'', () => {
    router.push(''/menu/menu1'')
    const len = wrapper.findAll(''.el-breadcrumb__inner'').length
    expect(len).toBe(2)
  })
  it(''nested route'', () => {
    router.push(''/menu/menu1/menu1-2/menu1-2-1'')
    const len = wrapper.findAll(''.el-breadcrumb__inner'').length
    expect(len).toBe(4)
  })
  it(''no meta.title'', () => {
    router.push(''/menu/menu1/menu1-2/menu1-2-2'')
    const len = wrapper.findAll(''.el-breadcrumb__inner'').length
    expect(len).toBe(3)
  })
  // it(''click link'', () => {
  //   router.push(''/menu/menu1/menu1-2/menu1-2-2'')
  //   const breadcrumbArray = wrapper.findAll(''.el-breadcrumb__inner'')
  //   const second = breadcrumbArray.at(1)
  //   console.log(breadcrumbArray)
  //   const href = second.find(''a'').attributes().href
  //   expect(href).toBe(''#/menu/menu1'')
  // })
  // it(''noRedirect'', () => {
  //   router.push(''/menu/menu1/menu1-2/menu1-2-1'')
  //   const breadcrumbArray = wrapper.findAll(''.el-breadcrumb__inner'')
  //   const redirectBreadcrumb = breadcrumbArray.at(2)
  //   expect(redirectBreadcrumb.contains(''a'')).toBe(false)
  // })
  it(''last breadcrumb'', () => {
    router.push(''/menu/menu1/menu1-2/menu1-2-1'')
    const breadcrumbArray = wrapper.findAll(''.el-breadcrumb__inner'')
    const redirectBreadcrumb = breadcrumbArray.at(3)
    expect(redirectBreadcrumb.contains(''a'')).toBe(false)
  })
})
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222648, 1157235318189994467, 1157235320526222646, 'Hamburger.spec.js', 'import { shallowMount } from ''@vue/test-utils''
import Hamburger from ''@/components/Hamburger/index.vue''
describe(''Hamburger.vue'', () => {
  it(''toggle click'', () => {
    const wrapper = shallowMount(Hamburger)
    const mockFn = jest.fn()
    wrapper.vm.$on(''toggleClick'', mockFn)
    wrapper.find(''.hamburger'').trigger(''click'')
    expect(mockFn).toBeCalled()
  })
  it(''prop isActive'', () => {
    const wrapper = shallowMount(Hamburger)
    wrapper.setProps({ isActive: true })
    expect(wrapper.contains(''.is-active'')).toBe(true)
    wrapper.setProps({ isActive: false })
    expect(wrapper.contains(''.is-active'')).toBe(false)
  })
})
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222649, 1157235318189994467, 1157235320526222646, 'SvgIcon.spec.js', 'import { shallowMount } from ''@vue/test-utils''
import SvgIcon from ''@/components/SvgIcon/index.vue''
describe(''SvgIcon.vue'', () => {
  it(''iconClass'', () => {
    const wrapper = shallowMount(SvgIcon, {
      propsData: {
        iconClass: ''test''
      }
    })
    expect(wrapper.find(''use'').attributes().href).toBe(''#icon-test'')
  })
  it(''className'', () => {
    const wrapper = shallowMount(SvgIcon, {
      propsData: {
        iconClass: ''test''
      }
    })
    expect(wrapper.classes().length).toBe(1)
    wrapper.setProps({ className: ''test'' })
    expect(wrapper.classes().includes(''test'')).toBe(true)
  })
})
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222650, 1157235318189994467, 1157235320526222644, 'utils', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222651, 1157235318189994467, 1157235320526222650, 'formatTime.spec.js', 'import { formatTime } from ''@/utils/index.js''

describe(''Utils:formatTime'', () => {
  const d = new Date(''2018-07-13 17:54:01'') // "2018-07-13 17:54:01"
  const retrofit = 5 * 1000

  it(''ten digits timestamp'', () => {
    expect(formatTime((d / 1000).toFixed(0))).toBe(''7月13日17时54分'')
  })
  it(''test now'', () => {
    expect(formatTime(+new Date() - 1)).toBe(''刚刚'')
  })
  it(''less two minute'', () => {
    expect(formatTime(+new Date() - 60 * 2 * 1000 + retrofit)).toBe(''2分钟前'')
  })
  it(''less two hour'', () => {
    expect(formatTime(+new Date() - 60 * 60 * 2 * 1000 + retrofit)).toBe(''2小时前'')
  })
  it(''less one day'', () => {
    expect(formatTime(+new Date() - 60 * 60 * 24 * 1 * 1000)).toBe(''1天前'')
  })
  it(''more than one day'', () => {
    expect(formatTime(d)).toBe(''7月13日17时54分'')
  })
  it(''format'', () => {
    expect(formatTime(d, ''{y}-{m}-{d} {h}:{i}'')).toBe(''2018-07-13 17:54'')
    expect(formatTime(d, ''{y}-{m}-{d}'')).toBe(''2018-07-13'')
    expect(formatTime(d, ''{y}/{m}/{d} {h}-{i}'')).toBe(''2018/07/13 17-54'')
  })
})
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222652, 1157235318189994467, 1157235320526222650, 'parseTime.spec.js', 'import { parseTime } from ''@/utils/index.js''

describe(''Utils:parseTime'', () => {
  const d = new Date(''2018-07-13 17:54:01'') // "2018-07-13 17:54:01"
  it(''timestamp'', () => {
    expect(parseTime(d)).toBe(''2018-07-13 17:54:01'')
  })
  it(''ten digits timestamp'', () => {
    expect(parseTime((d / 1000).toFixed(0))).toBe(''2018-07-13 17:54:01'')
  })
  it(''new Date'', () => {
    expect(parseTime(new Date(d))).toBe(''2018-07-13 17:54:01'')
  })
  it(''format'', () => {
    expect(parseTime(d, ''{y}-{m}-{d} {h}:{i}'')).toBe(''2018-07-13 17:54'')
    expect(parseTime(d, ''{y}-{m}-{d}'')).toBe(''2018-07-13'')
    expect(parseTime(d, ''{y}/{m}/{d} {h}-{i}'')).toBe(''2018/07/13 17-54'')
  })
  it(''get the day of the week'', () => {
    expect(parseTime(d, ''{a}'')).toBe(''五'') // 星期五
  })
  it(''get the day of the week'', () => {
    expect(parseTime(+d + 1000 * 60 * 60 * 24 * 2, ''{a}'')).toBe(''日'') // 星期日
  })
  it(''empty argument'', () => {
    expect(parseTime()).toBeNull()
  })
})
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222653, 1157235318189994467, 1157235320526222650, 'validate.spec.js', 'import { validUsername, isExternal } from ''@/utils/validate.js''

describe(''Utils:validate'', () => {
  it(''validUsername'', () => {
    expect(validUsername(''admin'')).toBe(true)
    expect(validUsername(''editor'')).toBe(true)
    expect(validUsername(''xxxx'')).toBe(false)
  })
  it(''isExternal'', () => {
    expect(isExternal(''https://github.com/PanJiaChen/vue-element-admin'')).toBe(true)
    expect(isExternal(''http://github.com/PanJiaChen/vue-element-admin'')).toBe(true)
    expect(isExternal(''github.com/PanJiaChen/vue-element-admin'')).toBe(false)
    expect(isExternal(''/dashboard'')).toBe(false)
    expect(isExternal(''./dashboard'')).toBe(false)
    expect(isExternal(''dashboard'')).toBe(false)
  })
})
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222654, 1157235318189994467, 0, 'vue.config.js', '''use strict''
const path = require(''path'')
const defaultSettings = require(''./src/settings.js'')

function resolve(dir) {
  return path.join(__dirname, dir)
}

const name = defaultSettings.title || ''vue Admin Template'' // page title

// If your port is set to 80,
// use administrator privileges to execute the command line.
// For example, Mac: sudo npm run
// You can change the port by the following methods:
// port = 9528 npm run dev OR npm run dev --port = 9528
const port = process.env.port || process.env.npm_config_port || 9528 // dev port

// All configuration item explanations can be find in https://cli.vuejs.org/config/
module.exports = {
  /**
   * You will need to set publicPath if you plan to deploy your site under a sub path,
   * for example GitHub Pages. If you plan to deploy your site to https://foo.github.io/bar/,
   * then publicPath should be set to "/bar/".
   * In most cases please use ''/'' !!!
   * Detail: https://cli.vuejs.org/config/#publicpath
   */
  publicPath: ''/'',
  outputDir: ''dist'',
  assetsDir: ''static'',
  lintOnSave: process.env.NODE_ENV === ''development'',
  productionSourceMap: false,
  devServer: {
    port: port,
    open: true,
    overlay: {
      warnings: false,
      errors: true
    },
    proxy: {
      // change xxx-api/login => mock/login
      // detail: https://cli.vuejs.org/config/#devserver-proxy
      [process.env.VUE_APP_BASE_API]: {
        target: `http://127.0.0.1:${port}/mock`,
        changeOrigin: true,
        pathRewrite: {
          [''^'' + process.env.VUE_APP_BASE_API]: ''''
        }
      }
    },
    after: require(''./mock/mock-server.js'')
  },
  configureWebpack: {
    // provide the app''s title in webpack''s name field, so that
    // it can be accessed in index.html to inject the correct title.
    name: name,
    resolve: {
      alias: {
        ''@'': resolve(''src'')
      }
    }
  },
  chainWebpack(config) {
    config.plugins.delete(''preload'') // TODO: need test
    config.plugins.delete(''prefetch'') // TODO: need test

    // set svg-sprite-loader
    config.module
      .rule(''svg'')
      .exclude.add(resolve(''src/icons''))
      .end()
    config.module
      .rule(''icons'')
      .test(/\.svg$/)
      .include.add(resolve(''src/icons''))
      .end()
      .use(''svg-sprite-loader'')
      .loader(''svg-sprite-loader'')
      .options({
        symbolId: ''icon-[name]''
      })
      .end()

    // set preserveWhitespace
    config.module
      .rule(''vue'')
      .use(''vue-loader'')
      .loader(''vue-loader'')
      .tap(options => {
        options.compilerOptions.preserveWhitespace = true
        return options
      })
      .end()

    config
    // https://webpack.js.org/configuration/devtool/#development
      .when(process.env.NODE_ENV === ''development'',
        config => config.devtool(''cheap-source-map'')
      )

    config
      .when(process.env.NODE_ENV !== ''development'',
        config => {
          config
            .plugin(''ScriptExtHtmlWebpackPlugin'')
            .after(''html'')
            .use(''script-ext-html-webpack-plugin'', [{
            // `runtime` must same as runtimeChunk name. default is `runtime`
              inline: /runtime\..*\.js$/
            }])
            .end()
          config
            .optimization.splitChunks({
              chunks: ''all'',
              cacheGroups: {
                libs: {
                  name: ''chunk-libs'',
                  test: /[\\/]node_modules[\\/]/,
                  priority: 10,
                  chunks: ''initial'' // only package third parties that are initially dependent
                },
                elementUI: {
                  name: ''chunk-elementUI'', // split elementUI into a single package
                  priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
                  test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
                },
                commons: {
                  name: ''chunk-commons'',
                  test: resolve(''src/components''), // can customize your rules
                  minChunks: 3, //  minimum common number
                  priority: 5,
                  reuseExistingChunk: true
                }
              }
            })
          config.optimization.runtimeChunk(''single'')
        }
      )
  }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222459, 1157235318189994435, 1157235320526222444, 'SpringSecurityConfig.java', 'package ${(projectConfig.projectPackageName)!}.base.security;

import ${(projectConfig.projectPackageName)!}.base.security.filter.JwtAuthenticationFilter;
import ${(projectConfig.projectPackageName)!}.base.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.authentication.AuthenticationDetailsSource;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.web.access.AccessDeniedHandler;
import org.springframework.security.web.authentication.AuthenticationFailureHandler;
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
import org.springframework.security.web.authentication.WebAuthenticationDetails;

import javax.servlet.http.HttpServletRequest;

@Configuration
@EnableGlobalMethodSecurity(prePostEnabled=true)
public class SpringSecurityConfig extends WebSecurityConfigurerAdapter {
    public static final String Login_Uri = "/api/user/login";

    @Autowired
    private CustomAuthenticationProvider authProvider;

    @Autowired
    private AuthenticationDetailsSource<HttpServletRequest, WebAuthenticationDetails> authenticationDetailsSource;

    @Autowired
    private AuthenticationSuccessHandler authenticationSuccessHandler;

    @Autowired
    private AuthenticationFailureHandler authenticationFailureHandler;

    @Autowired
    private AccessDeniedHandler accessDeniedHandler;

    @Autowired
    private JwtAuthenticationFilter jwtAuthenticationFilter;

    @Autowired
    public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
        auth.authenticationProvider(authProvider);
    }

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http.addFilterBefore(jwtAuthenticationFilter, UsernamePasswordAuthenticationFilter.class);

        http.headers().frameOptions().disable();
        http.csrf().disable();
        http.cors();

        http.authorizeRequests()
                .antMatchers("/manage/about", "/manage/404", "/manage/403", "/api/open/**").permitAll()
                .antMatchers("/res/**").permitAll()
                .antMatchers("/api/manage/**").hasAnyRole("SUPER_ADMIN")
                .antMatchers("/**").hasAnyRole("USER", "SUPER_ADMIN")
                .anyRequest().authenticated()
                .and()
            .formLogin()
                .loginPage(Login_Uri).permitAll()
                .successHandler(authenticationSuccessHandler)
                .failureHandler(authenticationFailureHandler)
                .authenticationDetailsSource(authenticationDetailsSource)
                .and()
            .logout().logoutUrl("/api/logout").logoutSuccessUrl(Login_Uri).permitAll()
                .and()
            .exceptionHandling()
                .accessDeniedHandler(accessDeniedHandler)
                .authenticationEntryPoint((request, response, e) -> {
                    BaseController.writeError(response, "尚未认证");
                });
    }

    @Bean
    public PasswordEncoder passwordEncoder() {
        return new BCryptPasswordEncoder();
    }
}

', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222431, 1157235318189994435, 1157235320526222426, 'BaseController.java', 'package ${(projectConfig.projectPackageName)!}.base;

import cn.aezo.utils.base.ExceptionU;
import cn.aezo.utils.base.ValidU;
import ${(projectConfig.projectPackageName)!}.base.config.rawbean.CustomObjectMapper;
import ${(projectConfig.projectPackageName)!}.entity.User;
import com.fasterxml.jackson.core.JsonProcessingException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Map;

@Component
public class BaseController {
    private static Logger logger = LoggerFactory.getLogger(BaseController.class);

    private static CustomObjectMapper customObjectMapper;

    public BaseController() {}

    @Autowired
    public BaseController(CustomObjectMapper customObjectMapper) {
        BaseController.customObjectMapper = customObjectMapper;
    }

    public static Long getUserId(HttpServletRequest request) {
        User user = getSessionUser(request);
        if(user == null) return null;

        Long id = user.getId();
        if(ValidU.isEmpty(id)) return null;

        return id;
    }

    public static User getSessionUser(HttpServletRequest request) {
        return (User) request.getSession().getAttribute(BaseKeys.SessionUserInfo);
    }

    public static void writeJson(HttpServletResponse response, Object object) {
        response.setCharacterEncoding("UTF-8");
        response.setContentType("application/json");

        PrintWriter writer = null;
        try {
            writer = response.getWriter();
        } catch (IOException e) {
            e.printStackTrace();
        }

        if(writer != null) {
            String str;
            if(object instanceof String) {
                str = (String) object;
            } else {
                try {
                    str = customObjectMapper.writeValueAsString(object);
                } catch (JsonProcessingException e) {
                    String msg = "json convert error, data:" + object;
                    logger.error(msg, e);
                    throw new ExceptionU.DataConvertException(msg);
                }
            }

            writer.write(str);
            writer.flush();
            writer.close();
        }
    }

    public static void writeSuccess(HttpServletResponse response, String message) {
        Result result = Result.success(message);
        writeJson(response, result);
    }

    public static void writeSuccess(HttpServletResponse response, String message, Object data) {
        Result result = Result.success(message, data);
        writeJson(response, result);
    }

    public static void writeError(HttpServletResponse response, String message) {
        Result result = Result.failure(message);
        writeJson(response, result);
    }

    public static void writeError(HttpServletResponse response, String message, Object data) {
        Result result = Result.failure(message, data);
        writeJson(response, result);
    }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222443, 1157235318189994435, 1157235320526222426, 'Result.java', 'package ${(projectConfig.projectPackageName)!}.base;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * @author smalle
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Result<T> implements Serializable {
    private static final long serialVersionUID = 1L;
    private static final String META_STATUS_SUCCESS = "success";
    private static final String META_STATUS_ERROR = "error";
    private static final Integer META_CODE_SUCCESS = 20000;
    private static final Integer META_CODE_ERROR = 40000;

    private String metaStatus;
    private String metaMessage;
    private T data;
    private Integer metaCode;
    private String metaCodeKey;
    private List metaErrors;
    private long timestamp = System.currentTimeMillis();

    public static boolean isSuccess(Result result) {
        return (result != null && Result.META_STATUS_SUCCESS.equals(result.getMetaStatus()));
    }

    public static boolean isError(Result result) {
        return !isSuccess(result);
    }

    public static Long getLongValue(Map<String, Object> context, String key) {
        if(context == null) {
            return null;
        }
        Object obj = context.get(key);
        if(obj == null) {
            return null;
        }
        if(obj instanceof Long) {
            return (Long) obj;
        } else if(obj instanceof Integer || obj instanceof String) {
            return Long.valueOf(obj + "");
        } else {
            throw new IllegalStateException("Illegal Long Key: " + key);
        }
    }

    public static Result success() {
        Result result = new Result();
        result.metaStatus = Result.META_STATUS_SUCCESS;
        result.metaCode = Result.META_CODE_SUCCESS;
        return result;
    }

    public static Result success(String metaMessage) {
        Result result = new Result();
        result.metaStatus = Result.META_STATUS_SUCCESS;
        result.metaMessage = metaMessage;
        result.metaCode = Result.META_CODE_SUCCESS;
        return result;
    }

    public static <T> Result success(T data) {
        Result result = new Result();
        result.metaStatus = Result.META_STATUS_SUCCESS;
        result.metaCode = Result.META_CODE_SUCCESS;
        result.data = data;
        return result;
    }

    public static <T> Result success(String metaMessage, T data) {
        Result result = new Result<>();
        result.metaStatus = Result.META_STATUS_SUCCESS;
        result.metaMessage = metaMessage;
        result.metaCode = Result.META_CODE_SUCCESS;
        result.data = data;
        return result;
    }

    public static Result failure() {
        Result result = new Result();
        result.metaStatus = Result.META_STATUS_ERROR;
        result.metaCode = Result.META_CODE_ERROR;
        return result;
    }

    public static Result failure(String metaMessage) {
        Result result = new Result();
        result.metaStatus = Result.META_STATUS_ERROR;
        result.metaMessage = metaMessage;
        result.metaCode = Result.META_CODE_ERROR;
        return result;
    }

    public static Result failure(String metaMessage, String metaCodeKey) {
        Result result = new Result();
        result.metaStatus = Result.META_STATUS_ERROR;
        result.metaMessage = metaMessage;
        result.metaCode = Result.META_CODE_ERROR;
        result.metaCodeKey = metaCodeKey;
        return result;
    }

    public static Result failure(String metaMessage, Integer metaCode) {
        Result result = new Result();
        result.metaStatus = Result.META_STATUS_ERROR;
        result.metaMessage = metaMessage;
        result.metaCode = metaCode;
        return result;
    }

    public static Result failure(String metaMessage, Map<String, Object> data) {
        Result result = new Result();
        result.metaStatus = Result.META_STATUS_ERROR;
        result.metaMessage = metaMessage;
        result.metaCode = Result.META_CODE_ERROR;
        result.data = data;
        return result;
    }

    public static <T> Result failure(String metaMessage, T data) {
        Result result = new Result();
        result.metaStatus = Result.META_STATUS_ERROR;
        result.metaMessage = metaMessage;
        result.metaCode = Result.META_CODE_ERROR;
        result.data = data;
        return result;
    }

    public static <T> Result failure(String metaMessage, String metaCodeKey, T data) {
        Result result = new Result();
        result.metaStatus = Result.META_STATUS_ERROR;
        result.metaMessage = metaMessage;
        result.metaCode = Result.META_CODE_ERROR;
        result.metaCodeKey = metaCodeKey;
        result.data = data;
        return result;
    }

    public static <T> Result failure(String metaMessage, List metaErrors, T data) {
        Result result = new Result();
        result.metaStatus = Result.META_STATUS_ERROR;
        result.metaMessage = metaMessage;
        result.metaCode = Result.META_CODE_ERROR;
        result.metaErrors = metaErrors;
        result.data = data;
        return result;
    }

    public static <T> Result failure(String metaMessage, Integer metaCode, String metaCodeKey, List metaErrors, T data) {
        Result result = new Result();
        result.metaStatus = Result.META_STATUS_ERROR;
        result.metaMessage = metaMessage;
        result.data = data;
        result.metaCode = metaCode;
        result.metaCodeKey = metaCodeKey;
        result.metaErrors = metaErrors;
        return result;
    }
}', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222655, 1157235318189994468, 0, '${(sbhCtx.mvnMainJavaProjectBaseDir)!}', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222656, 1157235318189994468, 1157235320526222655, '${(sbhCtx.baseApplicationName)!}Application.java', 'package ${projectConfig.projectPackageName};

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
@MapperScan({"${sbhCtx.baseDaoPackagePath}"})
public class ${(sbhCtx.baseApplicationName)!}Application {

    public static void main(String[] args) {
        SpringApplication.run(${(sbhCtx.baseApplicationName)!}Application.class, args);
    }
}', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222657, 1157235318189994468, 1157235320526222655, 'base', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222658, 1157235318189994468, 1157235320526222657, 'BaseController.java', 'package ${(projectConfig.projectPackageName)!}.base;

import cn.aezo.utils.base.ExceptionU;
import cn.aezo.utils.base.ValidU;
import ${(projectConfig.projectPackageName)!}.common.config.rawbean.CustomObjectMapper;
import ${(projectConfig.projectPackageName)!}.entity.User;
import com.fasterxml.jackson.core.JsonProcessingException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Map;

@Component
public class BaseController {
    private static Logger logger = LoggerFactory.getLogger(BaseController.class);

    private static CustomObjectMapper customObjectMapper;

    public BaseController() {}

    @Autowired
    public BaseController(CustomObjectMapper customObjectMapper) {
        BaseController.customObjectMapper = customObjectMapper;
    }

    public static Long getUserId(HttpServletRequest request) {
        User user = getSessionUser(request);
        if(user == null) return null;

        Long id = user.getId();
        if(ValidU.isEmpty(id)) return null;

        return id;
    }

    public static User getSessionUser(HttpServletRequest request) {
        return (User) request.getSession().getAttribute(BaseKeys.SessionUserInfo);
    }

    public static void writeJson(HttpServletResponse response, Object object) {
        response.setCharacterEncoding("UTF-8");
        response.setContentType("application/json");

        PrintWriter writer = null;
        try {
            writer = response.getWriter();
        } catch (IOException e) {
            e.printStackTrace();
        }

        if(writer != null) {
            String str;
            if(object instanceof String) {
                str = (String) object;
            } else {
                try {
                    str = customObjectMapper.writeValueAsString(object);
                } catch (JsonProcessingException e) {
                    String msg = "json convert error, data:" + object;
                    logger.error(msg, e);
                    throw new ExceptionU.DataConvertException(msg);
                }
            }

            writer.write(str);
            writer.flush();
            writer.close();
        }
    }

    public static void writeSuccess(HttpServletResponse response, String message) {
        Result result = Result.success(message);
        writeJson(response, result);
    }

    public static void writeSuccess(HttpServletResponse response, String message, Object data) {
        Result result = Result.success(message, data);
        writeJson(response, result);
    }

    public static void writeError(HttpServletResponse response, String message) {
        Result result = Result.failure(message);
        writeJson(response, result);
    }

    public static void writeError(HttpServletResponse response, String message, Object data) {
        Result result = Result.failure(message, data);
        writeJson(response, result);
    }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222659, 1157235318189994468, 1157235320526222657, 'BaseKeys.java', 'package ${(projectConfig.projectPackageName)!}.base;

public class BaseKeys {
    public static final String SessionUserInfo = "_USER_INFO_";

    public static final String AccessToken = "access_token";

    public static final String RefreshToken = "refresh_token";


}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222660, 1157235318189994468, 1157235320526222657, 'Result.java', 'package ${(projectConfig.projectPackageName)!}.base;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * @author smalle
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Result<T> implements Serializable {
    private static final long serialVersionUID = 1L;
    private static final String META_STATUS_SUCCESS = "success";
    private static final String META_STATUS_ERROR = "error";
    private static final Integer META_CODE_SUCCESS = 20000;
    private static final Integer META_CODE_ERROR = 40000;

    private String metaStatus;
    private String metaMessage;
    private T data;
    private Integer metaCode;
    private String metaCodeKey;
    private List metaErrors;
    private long timestamp = System.currentTimeMillis();

    public static boolean isSuccess(Result result) {
        return (result != null && Result.META_STATUS_SUCCESS.equals(result.getMetaStatus()));
    }

    public static boolean isError(Result result) {
        return !isSuccess(result);
    }

    public static Long getLongValue(Map<String, Object> context, String key) {
        if(context == null) {
            return null;
        }
        Object obj = context.get(key);
        if(obj == null) {
            return null;
        }
        if(obj instanceof Long) {
            return (Long) obj;
        } else if(obj instanceof Integer || obj instanceof String) {
            return Long.valueOf(obj + "");
        } else {
            throw new IllegalStateException("Illegal Long Key: " + key);
        }
    }

    public static Result success() {
        Result result = new Result();
        result.metaStatus = Result.META_STATUS_SUCCESS;
        result.metaCode = Result.META_CODE_SUCCESS;
        return result;
    }

    public static Result success(String metaMessage) {
        Result result = new Result();
        result.metaStatus = Result.META_STATUS_SUCCESS;
        result.metaMessage = metaMessage;
        result.metaCode = Result.META_CODE_SUCCESS;
        return result;
    }

    public static <T> Result success(T data) {
        Result result = new Result();
        result.metaStatus = Result.META_STATUS_SUCCESS;
        result.metaCode = Result.META_CODE_SUCCESS;
        result.data = data;
        return result;
    }

    public static <T> Result success(String metaMessage, T data) {
        Result result = new Result<>();
        result.metaStatus = Result.META_STATUS_SUCCESS;
        result.metaMessage = metaMessage;
        result.metaCode = Result.META_CODE_SUCCESS;
        result.data = data;
        return result;
    }

    public static Result failure() {
        Result result = new Result();
        result.metaStatus = Result.META_STATUS_ERROR;
        result.metaCode = Result.META_CODE_ERROR;
        return result;
    }

    public static Result failure(String metaMessage) {
        Result result = new Result();
        result.metaStatus = Result.META_STATUS_ERROR;
        result.metaMessage = metaMessage;
        result.metaCode = Result.META_CODE_ERROR;
        return result;
    }

    public static Result failure(String metaMessage, String metaCodeKey) {
        Result result = new Result();
        result.metaStatus = Result.META_STATUS_ERROR;
        result.metaMessage = metaMessage;
        result.metaCode = Result.META_CODE_ERROR;
        result.metaCodeKey = metaCodeKey;
        return result;
    }

    public static Result failure(String metaMessage, Integer metaCode) {
        Result result = new Result();
        result.metaStatus = Result.META_STATUS_ERROR;
        result.metaMessage = metaMessage;
        result.metaCode = metaCode;
        return result;
    }

    public static Result failure(String metaMessage, Map<String, Object> data) {
        Result result = new Result();
        result.metaStatus = Result.META_STATUS_ERROR;
        result.metaMessage = metaMessage;
        result.metaCode = Result.META_CODE_ERROR;
        result.data = data;
        return result;
    }

    public static <T> Result failure(String metaMessage, T data) {
        Result result = new Result();
        result.metaStatus = Result.META_STATUS_ERROR;
        result.metaMessage = metaMessage;
        result.metaCode = Result.META_CODE_ERROR;
        result.data = data;
        return result;
    }

    public static <T> Result failure(String metaMessage, String metaCodeKey, T data) {
        Result result = new Result();
        result.metaStatus = Result.META_STATUS_ERROR;
        result.metaMessage = metaMessage;
        result.metaCode = Result.META_CODE_ERROR;
        result.metaCodeKey = metaCodeKey;
        result.data = data;
        return result;
    }

    public static <T> Result failure(String metaMessage, List metaErrors, T data) {
        Result result = new Result();
        result.metaStatus = Result.META_STATUS_ERROR;
        result.metaMessage = metaMessage;
        result.metaCode = Result.META_CODE_ERROR;
        result.metaErrors = metaErrors;
        result.data = data;
        return result;
    }

    public static <T> Result failure(String metaMessage, Integer metaCode, String metaCodeKey, List metaErrors, T data) {
        Result result = new Result();
        result.metaStatus = Result.META_STATUS_ERROR;
        result.metaMessage = metaMessage;
        result.data = data;
        result.metaCode = metaCode;
        result.metaCodeKey = metaCodeKey;
        result.metaErrors = metaErrors;
        return result;
    }
}', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222661, 1157235318189994468, 1157235320526222655, 'common', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222662, 1157235318189994468, 1157235320526222661, 'exception', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222663, 1157235318189994468, 1157235320526222662, 'ErrorType.java', 'package ${(projectConfig.projectPackageName)!}.common.exception;

public enum ErrorType {
    ARGUMENT_MISSING_ERROR(40014, "error.argument_missing", "Argument Missing"),

    ARGUMENT_PARSE_ERROR(40015, "error.argument_parse_error", "Argument Parse Error"),

    ARGUMENT_INVALID_ERROR(40016, "error.argument_invalid", "Argument Invalid"),

    AUTH_LOGIN_FAILED_ERROR(40100, "error.auth_login_failed", "Auth Login Failed"),

    AUTH_TOKEN_INVALID_ERROR(40105, "error.auth_token_invalid", "Auth Token Invalid"),

    METHOD_NOT_SUPPORTED_ERROR(40504, "error.method_not_supported", "Method Not Supported"),

    EXCEPTION_ERROR(50000, "error.exception", "Error"),

    UNKNOWN_EXCEPTION_ERROR(50005, "error.unknown_exception", "Unknown Exception"),

    TODO_ERROR(50008, "error.todo_error", "Todo error");

    private Integer value;
    private String errorCode;
    private String message;

    ErrorType(Integer value, String key, String message) {
        this.value = value;
        this.errorCode = key;
        this.message = message;
    }

    public Integer getValue() {
        return value;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public String getMessage() {
        return message;
    }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222664, 1157235318189994468, 1157235320526222662, 'GlobalExceptionHandlerController.java', 'package ${(projectConfig.projectPackageName)!}.common.exception;

import cn.aezo.utils.base.ExceptionU;
import cn.aezo.utils.base.JsonU;
import cn.aezo.utils.base.MiscU;
import cn.aezo.utils.base.StringU;
import ${(projectConfig.projectPackageName)!}.base.Result;
import ${(projectConfig.projectPackageName)!}.common.config.rawbean.CustomObjectMapper;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController;
import org.springframework.boot.web.servlet.error.DefaultErrorAttributes;
import org.springframework.boot.autoconfigure.web.ErrorProperties;
import org.springframework.context.MessageSource;
import org.springframework.context.NoSuchMessageException;
import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.core.env.Environment;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.ServletRequestAttributes;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Locale;
import java.util.Map;

@RestController
@ControllerAdvice
public class GlobalExceptionHandlerController extends BasicErrorController {
    private Logger logger = LoggerFactory.getLogger(GlobalExceptionHandlerController.class);

    @Autowired
    private MessageSource messageSource;

    @Autowired
    private Environment env;

    @Autowired
    private CustomObjectMapper customObjectMapper;

    public GlobalExceptionHandlerController() {
        super(new DefaultErrorAttributes(), new ErrorProperties());
    }

    // 错误映射为json，Accept-Type为application/json的
    @Override
    @RequestMapping(produces = {MediaType.APPLICATION_JSON_VALUE})
    public ResponseEntity<Map<String, Object>> error(HttpServletRequest request) {
        // TODO 404
        logger.warn(this.getErrorAttributes(request, true).toString());

        Map<String, Object> body = MiscU.Instance.toMap();
        HttpStatus status = getStatus(request);

        try {
            ServletRequestAttributes requestAttributes = new ServletRequestAttributes(request);
            Throwable throwable = getError(requestAttributes);
            if(throwable == null) {
                throwable = new ExceptionU.UnknownException("Throwable Capture Failed");
                status = HttpStatus.INTERNAL_SERVER_ERROR;
            }

            Result result = this.exception(throwable);
            String str = customObjectMapper.writeValueAsString(result);
            body = JsonU.json2map(str);
        } catch (Exception e) {
            logger.error("Failed to return error message", e);
        }

        return new ResponseEntity<>(body, status);
    }

    // 错误映射到Html，Accept-Type为text/html的
    @Override
    @RequestMapping(produces = {"text/html"})
    public ModelAndView errorHtml(HttpServletRequest request, HttpServletResponse response) {
        return super.errorHtml(request, response);
    }

    @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
    @ExceptionHandler(Exception.class)
    public Result exception(Throwable e) {
        return getExceptionResponse(ErrorType.EXCEPTION_ERROR, e);
    }

    @ResponseStatus(HttpStatus.UNAUTHORIZED)
    @ExceptionHandler(ExceptionU.AuthLoginFailedException.class)
    public Result authLoginFailedException(Throwable e) {
        return getExceptionResponse(ErrorType.AUTH_LOGIN_FAILED_ERROR, e);
    }

    @ResponseStatus(HttpStatus.UNAUTHORIZED)
    @ExceptionHandler(ExceptionU.AuthTokenInvalidException.class)
    public Result authTokenInvalidException(Throwable e) {
        return getExceptionResponse(ErrorType.AUTH_TOKEN_INVALID_ERROR, e);
    }

    @ResponseStatus(HttpStatus.METHOD_NOT_ALLOWED)
    @ExceptionHandler(ExceptionU.MethodNotSupportedException.class)
    public Result httpRequestMethodNotSupportedException(Throwable e) {
        return getExceptionResponse(ErrorType.METHOD_NOT_SUPPORTED_ERROR, e);
    }

    @ResponseStatus(HttpStatus.BAD_REQUEST)
    @ExceptionHandler(ExceptionU.ArgumentMissingException.class)
    public Result missingServletRequestParameterException(Throwable e) {
        return getExceptionResponse(ErrorType.ARGUMENT_MISSING_ERROR, e);
    }

    @ResponseStatus(HttpStatus.BAD_REQUEST)
    @ExceptionHandler(ExceptionU.ArgumentParseException.class)
    public Result httpMessageNotReadableException(Throwable e) {
        return getExceptionResponse(ErrorType.ARGUMENT_PARSE_ERROR, e);
    }

    @ResponseStatus(HttpStatus.BAD_REQUEST)
    @ExceptionHandler(ExceptionU.ArgumentInvalidException.class)
    public Result methodArgumentNotValidException(Throwable e) {
        return getExceptionResponse(ErrorType.ARGUMENT_INVALID_ERROR, e);
    }

    @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
    @ExceptionHandler(ExceptionU.UnknownException.class)
    public Result unknownException(Throwable e) {
        return getExceptionResponse(ErrorType.UNKNOWN_EXCEPTION_ERROR, e);
    }

    @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
    @ExceptionHandler(ExceptionU.TodoException.class)
    public Result todoException(Throwable e) {
        return getExceptionResponse(ErrorType.TODO_ERROR, e);
    }

    private Result getExceptionResponse(ErrorType errorType, Throwable e) {
        ExceptionInfo exceptionInfo = new ExceptionInfo();

        String localMessage = getLocalMessage(errorType);
        String exceptionMessage = e.getMessage();
        StackTraceElement[] stackTrace = e.getStackTrace();

        String[] actives = env.getActiveProfiles();
        if (actives == null || actives.length <= 0 || !"prod".equals(actives[0])) {
            if (StringUtils.isNotEmpty(localMessage)) {
                exceptionInfo.setLocalMessage(localMessage);
            }
            if (StringUtils.isNotEmpty(exceptionMessage)) {
                exceptionInfo.setExceptionMessage(exceptionMessage);
            }
            if (stackTrace != null) {
                exceptionInfo.setStackTrace(stackTrace);
            }
        } else if (e instanceof ExceptionU) {
            if (StringUtils.isNotEmpty(exceptionMessage)) {
                exceptionInfo.setExceptionMessage(exceptionMessage);
            }
        }

        logger.error(StringU.buffer(", ", errorType.getErrorCode(), errorType.getMessage(), localMessage), e);

        return Result.failure(errorType.getMessage(), exceptionInfo);
    }

    private String getLocalMessage(ErrorType errorType) {
        String localMessage = null;
        Locale locale = null;
        try {
            locale = LocaleContextHolder.getLocale();
            localMessage = messageSource.getMessage(errorType.getErrorCode(), null, locale);
        } catch (NoSuchMessageException e1) {
            logger.warn("invalid i18n! errorCode: " + errorType.getErrorCode() + ", local: " + locale);
        }

        return localMessage;
    }

    public Throwable getError(RequestAttributes requestAttributes) {
        Throwable exception = (Throwable) requestAttributes.getAttribute(DefaultErrorAttributes.class.getName() + ".ERROR", 0);
        if(exception == null) {
            exception = (Throwable) requestAttributes.getAttribute("javax.servlet.error.exception", 0);
        }

        return exception;
    }

    public class ExceptionInfo {
        private String localMessage;

        private String exceptionMessage;

        private StackTraceElement[] stackTrace;

        public String getLocalMessage() {
            return localMessage;
        }

        public void setLocalMessage(String localMessage) {
            this.localMessage = localMessage;
        }

        public String getExceptionMessage() {
            return exceptionMessage;
        }

        public void setExceptionMessage(String exceptionMessage) {
            this.exceptionMessage = exceptionMessage;
        }

        public StackTraceElement[] getStackTrace() {
            return stackTrace;
        }

        public void setStackTrace(StackTraceElement[] stackTrace) {
            this.stackTrace = stackTrace;
        }
    }
}', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222665, 1157235318189994468, 1157235320526222661, 'security', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222666, 1157235318189994468, 1157235320526222665, 'annotation', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222667, 1157235318189994468, 1157235320526222666, 'HasSuperAdminRole.java', 'package ${(projectConfig.projectPackageName)!}.common.security.annotation;

import org.springframework.security.access.prepost.PreAuthorize;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

@Retention(RetentionPolicy.RUNTIME)
@PreAuthorize("hasRole(''SUPER_ADMIN'')")
public @interface HasSuperAdminRole {
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222668, 1157235318189994468, 1157235320526222665, 'CustomAuthenticationDetailsSource.java', 'package ${(projectConfig.projectPackageName)!}.common.security;

import org.springframework.security.authentication.AuthenticationDetailsSource;
import org.springframework.security.web.authentication.WebAuthenticationDetails;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;

@Component
public class CustomAuthenticationDetailsSource implements AuthenticationDetailsSource<HttpServletRequest, WebAuthenticationDetails> {

    @Override
    public WebAuthenticationDetails buildDetails(HttpServletRequest context) {
        return new WebAuthenticationDetails(context);
    }
}', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222669, 1157235318189994468, 1157235320526222665, 'CustomAuthenticationProvider.java', 'package ${(projectConfig.projectPackageName)!}.common.security;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.AuthenticationProvider;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;

import java.util.List;

@Component
public class CustomAuthenticationProvider implements AuthenticationProvider {
    @Autowired
    private CustomUserDetailsService customUserDetailsService;

    @Autowired
    private PasswordEncoder passwordEncoder;

    public CustomAuthenticationProvider() {
        super();
    }

    @Override
    public Authentication authenticate(final Authentication authentication) throws AuthenticationException {
        final String username = authentication.getName();
        final String password = authentication.getCredentials().toString();

        if((StringUtils.isEmpty(username) || StringUtils.isEmpty(password))
            <#if "${(dependencies.weixin)!}" != ""> && StringUtils.isEmpty(wxCode)</#if>) {
            throw new BadCredentialsException("invalid params: username,password<#if "${(dependencies.weixin)!}" != ""> and wxCode are</#if> invalid");
        }

        UserDetails userDetails = null;
        if(!StringUtils.isEmpty(username) && !StringUtils.isEmpty(password)) {
            try {
                userDetails = customUserDetailsService.loadUserByUsername(username);

                if(userDetails == null || userDetails.getPassword() == null) {
                    throw new BadCredentialsException("invalid password");
                }
                if(!passwordEncoder.matches(password, userDetails.getPassword())) {
                    throw new BadCredentialsException("wrong password");
                }
            } catch (UsernameNotFoundException e) {
                e.printStackTrace();
            }
        }

        <#if "${(dependencies.weixin)!}" != "">
        if(userDetails == null) {
            CustomWebAuthenticationDetails details = (CustomWebAuthenticationDetails) authentication.getDetails();
            final String wxCode = details.getWxCode();
            if(!StringUtils.isEmpty(wxCode)) {
                String openid = tokenManager.getOpenid(wxCode);
                principal = customUserDetailsService.loadUserByOpenid(openid);
            }
        }
        </#if>

        if(userDetails != null) {
            final List<GrantedAuthority> grantedAuths = (List<GrantedAuthority>) userDetails.getAuthorities();
            final Authentication auth = new UsernamePasswordAuthenticationToken(userDetails, password, grantedAuths);
            return auth;
        }

        return null;
    }

    @Override
    public boolean supports(final Class<?> authentication) {
        return authentication.equals(UsernamePasswordAuthenticationToken.class);
    }
}', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222670, 1157235318189994468, 1157235320526222665, 'CustomUserDetailsService.java', 'package ${(projectConfig.projectPackageName)!}.common.security;

import ${(projectConfig.projectPackageName)!}.common.security.jwt.JwtUserDetails;
import ${(sbhCtx.baseDaoPackagePath)!}.UserMapper;
import ${(sbhCtx.baseEntityPackagePath)!}.User;
import cn.aezo.utils.base.MiscU;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Component;

import java.util.Collection;
import java.util.List;

@Component
public class CustomUserDetailsService implements UserDetailsService {
    private final UserMapper userMapper;

    @Autowired
    public CustomUserDetailsService(UserMapper userMapper) {
        this.userMapper = userMapper;
    }

    @Override
    public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
        if(username == null || "".equals(username)) {
            throw new UsernameNotFoundException("invalid username " + username);
        }

        List<User> users = userMapper.selectByMap(MiscU.Instance.toMap("username", username));
        if(users == null || users.size() != 1) {
            throw new UsernameNotFoundException("Could not find user " + username);
        }

        User user = users.get(0);

        return new JwtUserDetails(
            user.getId(),
            user.getUsername(),
            user.getPassword(),
            AuthorityUtils.createAuthorityList("ROLE_" + user.getRoleCode())
        );

        // return new CustomUserDetails(users.get(0));
    }

    <#if "${(dependencies.weixin)!}" != "">
    public UserDetails loadUserByOpenid(String openid) throws UsernameNotFoundException {
        if(openid == null || "".equals(openid)) {
            throw new UsernameNotFoundException("invalid openid");
        }

        UserExample userExample = new UserExample();
        userExample.createCriteria().andOpenidEqualTo(openid);
        List<User> users = userMapper.selectByExample(userExample);
        if(user == null) {
            throw new UsernameNotFoundException("Could not find user by openid: " + openid);
        }

        return new JwtUserDetails(user.getId(), user.getUsername(), user.getPassword(),
        AuthorityUtils.createAuthorityList("ROLE_" + user.getRoleCode()));

        // return new CustomUserDetails(users.get(0));
    }
    </#if>

    private final static class CustomUserDetails extends User implements UserDetails {
        private CustomUserDetails(User user) {
            super();
          	<#if "${(properties.userFields)!}" != "">
            	<#list properties.userFields?if_exists as item>
            this.set${item}(user.get${item}());
            	</#list>
            </#if>
        }

        @Override
        public Collection<? extends GrantedAuthority> getAuthorities() {
            return AuthorityUtils.createAuthorityList("ROLE_" + this.getRoleCode());
        }

        @Override
        public boolean isAccountNonExpired() {
            return true;
        }

        @Override
        public boolean isAccountNonLocked() {
            return true;
        }

        @Override
        public boolean isCredentialsNonExpired() {
            return true;
        }

        @Override
        public boolean isEnabled() {
            return true;
        }

        private static final long serialVersionUID = 5639683223516504866L;
    }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222671, 1157235318189994468, 1157235320526222665, 'CustomWebAuthenticationDetails.java', 'package ${(projectConfig.projectPackageName)!}.common.security;

import org.springframework.security.web.authentication.WebAuthenticationDetails;

import javax.servlet.http.HttpServletRequest;

public class CustomWebAuthenticationDetails extends WebAuthenticationDetails {
    private static final long serialVersionUID = 1L;
    <#if "${(dependencies.weixin)!}" != "">private final String wxCode;</#if>

    public CustomWebAuthenticationDetails(HttpServletRequest request) {
        super(request);
        <#if "${(dependencies.weixin)!}" != "">wxCode = request.getParameter("wxCode");</#if>
    }

    <#if "${(dependencies.weixin)!}" != "">
    public String getWxCode() {
        return wxCode;
    }
    </#if>

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(super.toString())<#if "${(dependencies.weixin)!}" != "">.append("; wxCode: ").append(this.getWxCode())</#if>;
        return sb.toString();
    }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222672, 1157235318189994468, 1157235320526222665, 'filter', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222673, 1157235318189994468, 1157235320526222672, 'JwtAuthenticationFilter.java', 'package ${(projectConfig.projectPackageName)!}.common.security.filter;

import cn.aezo.utils.base.ExceptionU;
import ${(projectConfig.projectPackageName)!}.common.security.SpringSecurityConfig;
import ${(projectConfig.projectPackageName)!}.common.security.jwt.SecurityJwtTokenUtils;
import io.jsonwebtoken.SignatureException;
import org.apache.commons.lang3.StringUtils;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.web.authentication.WebAuthenticationDetailsSource;
import org.springframework.stereotype.Component;
import org.springframework.web.filter.OncePerRequestFilter;

import javax.annotation.Resource;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@Component
public class JwtAuthenticationFilter extends OncePerRequestFilter {

    private String token_header = "X-Token";

    @Resource
    private SecurityJwtTokenUtils securityJwtTokenUtils;

    @Override
    protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws ServletException, IOException {
        if(!SpringSecurityConfig.Login_Uri.equals(request.getRequestURI())) {
            String authToken = request.getHeader(this.token_header);
            if(StringUtils.isEmpty(authToken)) {
                chain.doFilter(request, response);
                return;
            }

            try {
                String username = securityJwtTokenUtils.getUsernameFromToken(authToken);
                if(username == null)
                    throw new ExceptionU.AuthTokenInvalidException();

                logger.info(String.format("Checking authentication for user %s. ExpirationDate: %s.",
                    username, securityJwtTokenUtils.getExpirationDateFromToken(authToken)));

                if (SecurityContextHolder.getContext().getAuthentication() == null) {
                    // It is not compelling necessary to load the use details from the database. You could also store the information
                    // in the token and read it from it. It''s up to you ;)
                    // UserDetails userDetails = this.userDetailsService.loadUserByUsername(username);
                    UserDetails userDetails = securityJwtTokenUtils.getUserFromToken(authToken);

                    // For simple validation it is completely sufficient to just check the token integrity. You don''t have to call
                    // the database compellingly. Again it''s up to you ;)
                    if (securityJwtTokenUtils.validateToken(authToken, userDetails)) {
                        UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken
                            (userDetails, null, userDetails.getAuthorities());
                        authentication.setDetails(new WebAuthenticationDetailsSource().buildDetails(request));
                        logger.info(String.format("Authenticated user %s, setting security context", username));
                        SecurityContextHolder.getContext().setAuthentication(authentication);
                    }
                }
            } catch (SignatureException e) {
                throw new ExceptionU.AuthTokenInvalidException();
            }
        }

        chain.doFilter(request, response);
    }

}', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222674, 1157235318189994468, 1157235320526222665, 'handler', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222675, 1157235318189994468, 1157235320526222674, 'LoginFinishHandler.java', 'package ${(projectConfig.projectPackageName)!}.common.security.handler;

import cn.aezo.utils.base.MiscU;
import cn.aezo.utils.base.ValidU;
import ${(projectConfig.projectPackageName)!}.base.BaseKeys;
import ${(projectConfig.projectPackageName)!}.common.security.jwt.JwtUserDetails;
import ${(projectConfig.projectPackageName)!}.common.security.jwt.SecurityJwtTokenUtils;
import ${(projectConfig.projectPackageName)!}.base.BaseController;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
import org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler;
import org.springframework.stereotype.Component;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;

@Component
public class LoginFinishHandler {
    private Logger logger = LoggerFactory.getLogger(LoginFinishHandler.class);

    @Autowired
    private SecurityJwtTokenUtils jwtUtils;

    @Component
    public class MyAuthenticationSuccessHandler implements AuthenticationSuccessHandler {
        @Override
        public void onAuthenticationSuccess(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Authentication authentication) throws IOException, ServletException {
            HttpSession session = httpServletRequest.getSession();
            JwtUserDetails userDetails = (JwtUserDetails) authentication.getPrincipal();
            session.setAttribute(BaseKeys.SessionUserInfo, userDetails);

            logger.info("{} 登录成功", userDetails.getUsername());

            // httpServletResponse.sendRedirect("/manage/");
            String accessToken = jwtUtils.generateAccessToken(userDetails);
            String refreshToken = jwtUtils.generateRefreshToken(userDetails);

            if(ValidU.isEmpty(accessToken) || ValidU.isEmpty(refreshToken)) {
                BaseController.writeError(httpServletResponse, "获取令牌失败");
                return;
            }

            // TODO 登录成功数据返回
            BaseController.writeSuccess(httpServletResponse, "登录成功", MiscU.Instance.toMap(
                BaseKeys.AccessToken, accessToken,
                BaseKeys.RefreshToken, refreshToken
            ));
        }
    }

    @Component
    public class MyAuthenticationFailureHandler extends SimpleUrlAuthenticationFailureHandler {
        @Override
        public void onAuthenticationFailure(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, AuthenticationException e) throws IOException, ServletException {
            logger.info("登录失败");
            BaseController.writeError(httpServletResponse, e.getMessage());
        }
    }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222676, 1157235318189994468, 1157235320526222674, 'MyAccessDeniedHandler.java', 'package ${(projectConfig.projectPackageName)!}.common.security.handler;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.web.access.AccessDeniedHandler;
import org.springframework.stereotype.Component;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@Component
public class MyAccessDeniedHandler implements AccessDeniedHandler {

    private static Logger logger = LoggerFactory.getLogger(MyAccessDeniedHandler.class);

    @Override
    public void handle(HttpServletRequest httpServletRequest,
                       HttpServletResponse httpServletResponse,
                       AccessDeniedException e) throws IOException, ServletException {

        Authentication auth = SecurityContextHolder.getContext().getAuthentication();

        if (auth != null) {
            logger.info("用户 ''" + auth.getName() + "'' 试图访问受保护的 URL: " + httpServletRequest.getRequestURI());
        }

        httpServletResponse.sendRedirect("/manage/403");
    }
}

', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222677, 1157235318189994468, 1157235320526222665, 'jwt', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222678, 1157235318189994468, 1157235320526222677, 'JwtUserDetails.java', 'package ${(projectConfig.projectPackageName)!}.common.security.jwt;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

import java.util.Collection;

public class JwtUserDetails implements UserDetails {

    private Long userId;
    private String password;
    private final String username;
    private final Collection<? extends GrantedAuthority> authorities;
    private final boolean accountNonExpired;
    private final boolean accountNonLocked;
    private final boolean credentialsNonExpired;
    private final boolean enabled;


    public JwtUserDetails(long userId, String username, String password, Collection<? extends GrantedAuthority> authorities) {
        this(userId, username, password, true, true, true, true, authorities);
    }

    public JwtUserDetails(long userId, String username, String password, boolean enabled, boolean accountNonExpired,
                          boolean credentialsNonExpired, boolean accountNonLocked,
                          Collection<? extends GrantedAuthority> authorities) {
        if (username != null && !"".equals(username) && password != null) {
            this.userId = userId;
            this.username = username;
            this.password = password;
            this.enabled = enabled;
            this.accountNonExpired = accountNonExpired;
            this.credentialsNonExpired = credentialsNonExpired;
            this.accountNonLocked = accountNonLocked;
            this.authorities = authorities;
        } else {
            throw new IllegalArgumentException("Cannot pass null or empty values to constructor");
        }
    }

    @Override
    public Collection<? extends GrantedAuthority> getAuthorities() {
        return authorities;
    }

    public long getUserId() {
        return userId;
    }

    @Override
    public String getPassword() {
        return password;
    }

    @Override
    public String getUsername() {
        return username;
    }

    @Override
    public boolean isAccountNonExpired() {
        return accountNonExpired;
    }

    @Override
    public boolean isAccountNonLocked() {
        return accountNonLocked;
    }

    @Override
    public boolean isCredentialsNonExpired() {
        return credentialsNonExpired;
    }

    @Override
    public boolean isEnabled() {
        return enabled;
    }
}', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222679, 1157235318189994468, 1157235320526222677, 'SecurityJwtTokenUtils.java', 'package ${(projectConfig.projectPackageName)!}.common.security.jwt;

import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
import io.jsonwebtoken.impl.compression.CompressionCodecs;
import org.apache.commons.codec.binary.Base64;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.stereotype.Component;

import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;

@Component
public class SecurityJwtTokenUtils {

    public static final String Role_Refresh_Token = "Role_Refresh_Token";

    private static final String Claim_Key_User_Id = "user_id";
    private static final String Claim_Key_Authorities = "scope";
    private static final String Claim_Key_Account_Enabled = "enabled";
    private static final String Claim_Key_Account_Non_Locked = "non_locked";
    private static final String Claim_Key_Account_Non_Expired = "non_expired";

    private final String secretKey = "7786df7fc3a34e26a61c034d5e888526";

    private final Long access_token_expiration = 1000L*60*60*2; // access_token 默认2小时(2*60*60*1000L millisecond)

    private final Long refresh_token_expiration = 1000L*60*60*24*7;  // refresh_token 默认7天

    private final SignatureAlgorithm signature_algorithm = SignatureAlgorithm.HS256;

    public JwtUserDetails getUserFromToken(String token) {
        final Claims claims = getClaimsFromToken(token);
        Long userId = getUserIdFromToken(token);
        String username = claims.getSubject();
        List roles = (List) claims.get(Claim_Key_Authorities);
        Collection<? extends GrantedAuthority> authorities = parseArrayToAuthorities(roles);
        boolean account_enabled = (Boolean) claims.get(Claim_Key_Account_Enabled);
        boolean account_non_locked = (Boolean) claims.get(Claim_Key_Account_Non_Locked);
        boolean account_non_expired = (Boolean) claims.get(Claim_Key_Account_Non_Expired);

        return new JwtUserDetails(userId, username, "password", account_enabled, account_non_expired, true,
                account_non_locked, authorities);
    }

    public Long getUserIdFromToken(String token) {
        final Claims claims = getClaimsFromToken(token);
        if(claims.get(Claim_Key_User_Id) == null)
            return null;
        return Long.valueOf(String.valueOf(claims.get(Claim_Key_User_Id)));
    }

    public String getUsernameFromToken(String token) {
        return getClaimsFromToken(token).getSubject();
    }

    public Date getCreatedDateFromToken(String token) {
        return getClaimsFromToken(token).getIssuedAt();
    }

    public Date getExpirationDateFromToken(String token) {
        return getClaimsFromToken(token).getExpiration();
    }

    public String generateAccessToken(UserDetails userDetails) {
        JwtUserDetails user = (JwtUserDetails) userDetails;
        Map<String, Object> claims = generateClaims(user);
        claims.put(Claim_Key_Authorities, authoritiesToArray(user.getAuthorities()));
        return generateAccessToken(user.getUsername(), claims);
    }

    public String refreshToken(String token) {
        final Claims claims = getClaimsFromToken(token);
        return generateAccessToken(claims.getSubject(), claims);
    }

    public String generateRefreshToken(UserDetails userDetails) {
        JwtUserDetails user = (JwtUserDetails) userDetails;
        Map<String, Object> claims = generateClaims(user);
        // 只授于更新 token 的权限
        String roles[] = new String[]{SecurityJwtTokenUtils.Role_Refresh_Token};
        claims.put(Claim_Key_Authorities, roles);
        return generateRefreshToken(user.getUsername(), claims);
    }

    public Boolean canTokenBeRefreshed(String token, Date lastPasswordReset) {
        final Date created = getCreatedDateFromToken(token);
        return !isCreatedBeforeLastPasswordReset(created, lastPasswordReset)
                && (!isTokenExpired(token));
    }

    public Boolean validateToken(String token, UserDetails userDetails) {
        JwtUserDetails user = (JwtUserDetails) userDetails;
        final Long userId = getUserIdFromToken(token);
        final String username = getUsernameFromToken(token);
        // final Date created = getCreatedDateFromToken(token);
        // final Date expiration = getExpirationDateFromToken(token);
        return (userId == user.getUserId()
                && username.equals(user.getUsername())
                && !isTokenExpired(token)
                /* && !isCreatedBeforeLastPasswordReset(created, userDetails.getLastPasswordResetDate()) */
        );
    }

    private Claims getClaimsFromToken(String token) {
        Claims claims = Jwts.parser()
                        .setSigningKey(generalSecretKey())
                        .parseClaimsJws(token)
                        .getBody();
        return claims;
    }

    private String generateAccessToken(String subject, Map<String, Object> claims) {
        return generateToken(subject, claims, access_token_expiration);
    }

    private String generateRefreshToken(String subject, Map<String, Object> claims) {
        return generateToken(subject, claims, refresh_token_expiration);
    }

    private Map<String, Object> generateClaims(JwtUserDetails user) {
        Map<String, Object> claims = new HashMap<>();
        claims.put(Claim_Key_User_Id, user.getUserId());
        claims.put(Claim_Key_Account_Enabled, user.isEnabled());
        claims.put(Claim_Key_Account_Non_Locked, user.isAccountNonLocked());
        claims.put(Claim_Key_Account_Non_Expired, user.isAccountNonExpired());
        return claims;
    }

    private Boolean isTokenExpired(String token) {
        final Date expiration = getExpirationDateFromToken(token);
        return expiration.before(new Date());
    }

    private Boolean isCreatedBeforeLastPasswordReset(Date created, Date lastPasswordReset) {
        return (lastPasswordReset != null && created.before(lastPasswordReset));
    }

    private List authoritiesToArray(Collection<? extends GrantedAuthority> authorities) {
        List<String> list = new ArrayList<>();
        for (GrantedAuthority ga : authorities) {
            list.add(ga.getAuthority());
        }
        return list;
    }

    private Collection<? extends GrantedAuthority> parseArrayToAuthorities(List roles) {
        Collection<GrantedAuthority> authorities = new ArrayList<>();
        SimpleGrantedAuthority authority;
        for (Object role : roles) {
            authority = new SimpleGrantedAuthority(role.toString());
            authorities.add(authority);
        }
        return authorities;
    }

    private String generateToken(String subject, Map<String, Object> claims, long expiration) {
        return Jwts.builder()
                .setClaims(claims)
                .setSubject(subject)
                .setId(UUID.randomUUID().toString())
                .setIssuedAt(new Date())
                .setExpiration(generateExpirationDate(expiration))
                .compressWith(CompressionCodecs.DEFLATE)
                .signWith(signature_algorithm, generalSecretKey())
                .compact();
    }

    private Date generateExpirationDate(long expiration) {
        return new Date(System.currentTimeMillis() + expiration * 1000);
    }

    private SecretKey generalSecretKey() {
        byte[] encodedKey = Base64.decodeBase64(secretKey);
        return new SecretKeySpec(encodedKey, 0, encodedKey.length, "AES");
    }

}', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222680, 1157235318189994468, 1157235320526222665, 'SpringSecurityConfig.java', 'package ${(projectConfig.projectPackageName)!}.common.security;

import ${(projectConfig.projectPackageName)!}.common.security.filter.JwtAuthenticationFilter;
import ${(projectConfig.projectPackageName)!}.base.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.authentication.AuthenticationDetailsSource;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.web.access.AccessDeniedHandler;
import org.springframework.security.web.authentication.AuthenticationFailureHandler;
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
import org.springframework.security.web.authentication.WebAuthenticationDetails;

import javax.servlet.http.HttpServletRequest;

@Configuration
@EnableGlobalMethodSecurity(prePostEnabled=true)
public class SpringSecurityConfig extends WebSecurityConfigurerAdapter {
    public static final String Login_Uri = "/api/user/login";

    @Autowired
    private CustomAuthenticationProvider authProvider;

    @Autowired
    private AuthenticationDetailsSource<HttpServletRequest, WebAuthenticationDetails> authenticationDetailsSource;

    @Autowired
    private AuthenticationSuccessHandler authenticationSuccessHandler;

    @Autowired
    private AuthenticationFailureHandler authenticationFailureHandler;

    @Autowired
    private AccessDeniedHandler accessDeniedHandler;

    @Autowired
    private JwtAuthenticationFilter jwtAuthenticationFilter;

    @Autowired
    public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
        auth.authenticationProvider(authProvider);
    }

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http.addFilterBefore(jwtAuthenticationFilter, UsernamePasswordAuthenticationFilter.class);

        http.headers().frameOptions().disable();
        http.csrf().disable();
        http.cors();

        http.authorizeRequests()
                .antMatchers("/manage/about", "/manage/404", "/manage/403", "/api/open/**").permitAll()
                .antMatchers("/res/**").permitAll()
                .antMatchers("/api/manage/**").hasAnyRole("SUPER_ADMIN")
                .antMatchers("/**").hasAnyRole("USER", "SUPER_ADMIN")
                .anyRequest().authenticated()
                .and()
            .formLogin()
                .loginPage(Login_Uri).permitAll()
                .successHandler(authenticationSuccessHandler)
                .failureHandler(authenticationFailureHandler)
                .authenticationDetailsSource(authenticationDetailsSource)
                .and()
            .logout().logoutUrl("/api/logout").logoutSuccessUrl(Login_Uri).permitAll()
                .and()
            .exceptionHandling()
                .accessDeniedHandler(accessDeniedHandler)
                .authenticationEntryPoint((request, response, e) -> {
                    BaseController.writeError(response, "尚未认证");
                });
    }

    @Bean
    public PasswordEncoder passwordEncoder() {
        return new BCryptPasswordEncoder();
    }
}

', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222681, 1157235318189994468, 1157235320526222655, 'config', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222682, 1157235318189994468, 1157235320526222681, 'BaseBean.java', 'package ${(projectConfig.projectPackageName)!}.common.config;

import ${(projectConfig.projectPackageName)!}.common.config.rawbean.CustomObjectMapper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.CorsConfigurationSource;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;

import java.util.Arrays;

@Configuration
public class BaseBean {
    @Bean
    CorsConfigurationSource corsConfigurationSource() {
        CorsConfiguration configuration = new CorsConfiguration();
        configuration.setAllowedOrigins(Arrays.asList("*"));
        configuration.setAllowedMethods(Arrays.asList("*"));
        configuration.setAllowedHeaders(Arrays.asList("*"));
        configuration.setAllowCredentials(true);

        UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
        source.registerCorsConfiguration("/**", configuration);
        return source;
    }

    @Bean
    public RestTemplate restTemplate() {
        RestTemplate restTemplate = new RestTemplate();
        // restTemplate.getMessageConverters().add(new WxMappingJackson2HttpMessageConverter());
        return restTemplate;
    }

    @Bean
    public CustomObjectMapper customObjectMapper() {
        return new CustomObjectMapper()
            .setNotContainNull()
            .setCamelCaseToLowerCaseWithUnderscores();
    }

    @Bean
    public MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter() {
        return new MappingJackson2HttpMessageConverter(this.customObjectMapper());
    }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222683, 1157235318189994468, 1157235320526222681, 'BaseInterceptor.java', 'package ${(projectConfig.projectPackageName)!}.common.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Configuration
public class BaseInterceptor implements HandlerInterceptor {
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
            throws Exception {
        return true;
    }

    @Override
    public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,
                           ModelAndView modelAndView) throws Exception {
        if(modelAndView == null) return;

        if(response.getStatus() == 500) {
            // modelAndView.setViewName("/error/500");
        } else if(response.getStatus() == 404) {
            // modelAndView.setViewName("/error/404");
        } else if(response.getStatus() == 403) {
            // modelAndView.setViewName("/error/403");
        }

    }

    @Override
    public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)
            throws Exception {
    }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222684, 1157235318189994468, 1157235320526222681, 'InterceptorConfig.java', 'package ${(projectConfig.projectPackageName)!}.common.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@Configuration
public class InterceptorConfig extends WebMvcConfigurerAdapter {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new BaseInterceptor()).addPathPatterns("/**");

        super.addInterceptors(registry);
    }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222685, 1157235318189994468, 1157235320526222681, 'MinionsConfig.java', 'package ${(projectConfig.projectPackageName)!}.common.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties(prefix = "minions")
public class MinionsConfig {
    private String helloWorld;

    public String getHelloWorld() {
        return helloWorld;
    }

    public void setHelloWorld(String helloWorld) {
        this.helloWorld = helloWorld;
    }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222686, 1157235318189994468, 1157235320526222681, 'rawbean', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222687, 1157235318189994468, 1157235320526222686, 'CustomObjectMapper.java', 'package ${(projectConfig.projectPackageName)!}.common.config.rawbean;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.SerializerProvider;
import org.apache.commons.lang3.StringUtils;

import java.io.IOException;
import java.text.DateFormat;
import java.text.SimpleDateFormat;

public class CustomObjectMapper extends ObjectMapper {
    public CustomObjectMapper() {
        // 进行缩进输出
        this.configure(SerializationFeature.INDENT_OUTPUT, true);
    }

    // 排除值为空属性
    public CustomObjectMapper setNotContainNull() {
        this.setSerializationInclusion(JsonInclude.Include.NON_NULL);
        return this;
    }

    // 将驼峰转为下划线
    public CustomObjectMapper setCamelCaseToLowerCaseWithUnderscores() {
        this.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);
        return this;
    }

    // 进行日期格式化
    public CustomObjectMapper setDateFormatPattern(String dateFormatPattern) {
        if (StringUtils.isNotEmpty(dateFormatPattern)) {
            DateFormat dateFormat = new SimpleDateFormat(dateFormatPattern);
            this.setDateFormat(dateFormat);
        }

        return this;
    }

    // 排除属性名为空(""/null)的字段
    public CustomObjectMapper setNotContainNullKey() {
        this.getSerializerProvider().setNullKeySerializer(new MyNullKeySerializer());
        return this;
    }

    private class MyNullKeySerializer extends JsonSerializer<Object> {
        @Override
        public void serialize(Object nullKey, JsonGenerator jsonGenerator, SerializerProvider unused) throws IOException {
            jsonGenerator.writeFieldName("");
        }
    }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222688, 1157235318189994468, 1157235320526222655, 'controller', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222689, 1157235318189994468, 1157235320526222688, 'OpenController.java', 'package ${(projectConfig.projectPackageName)!}.controller;

import ${(projectConfig.projectPackageName)!}.base.Result;
import cn.aezo.utils.base.DateU;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

@RestController
@RequestMapping("/api/open")
public class OpenController {

    @RequestMapping("/hello")
    public Result test() {
        return Result.success("hello minions");
    }

    @RequestMapping("/ping")
    public Result ping() {
        return Result.success(DateU.format(new Date(), "yyyy/MM/dd HH:mm:ss.SSS"));
    }
}', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222690, 1157235318189994468, 1157235320526222655, 'modules', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222691, 1157235318189994468, 1157235320526222690, 'base', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222692, 1157235318189994468, 1157235320526222690, 'social', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222693, 1157235318189994468, 1157235320526222692, '${(dependencies.weixin)!}', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222694, 1157235318189994468, 1157235320526222693, 'WxAuthService.java', 'package cn.aezo.minions.utils;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.util.UriComponentsBuilder;

import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URLEncoder;
import java.util.LinkedHashMap;

@Component
public class WxAuthService {
    private Logger logger = LoggerFactory.getLogger(WxAuthService.class);

    @Autowired
    private RestTemplate restTemplate;

    //请求此地址即跳转到二维码登录界面
    private static final String AuthorizationUrl =
            "https://open.weixin.qq.com/connect/oauth2/authorize?appid=%s&redirect_uri=%s&response_type=code&scope=%s&state=%s#wechat_redirect";

    // 获取用户 openid 和 access_token 的 URL
    private static final String AccesstokeOpenidUrl =
            "https://api.weixin.qq.com/sns/oauth2/access_token?appid=%s&secret=%s&code=%s&grant_type=authorization_code";

    private static final String RefreshTokenUrl =
            "https://api.weixin.qq.com/sns/oauth2/refresh_token?appid=%s&grant_type=refresh_token&refresh_token=%s";

    private static final String UserInfoUrl =
            "https://api.weixin.qq.com/sns/userinfo?access_token=%s&openid=%s&lang=zh_CN";

    private static final String Scope = "snsapi_userinfo";

    @Value("${help.wxAppId}")
    private String wxAppId;

    @Value("${help.wxAppSecret}")
    private String wxAppSecret;

    @Value("${help.wxCallbackUrl}")
    private String wxCallbackUrl;

    public String getAuthorizationUrl() throws UnsupportedEncodingException {
        wxCallbackUrl = URLEncoder.encode(wxCallbackUrl, "utf-8");
        String url = String.format(AuthorizationUrl, wxAppId, wxCallbackUrl, Scope, System.currentTimeMillis());
        return url;
    }

    // https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxb50d02d2fd72d2d2&redirect_uri=http%3a%2f%2fxy9h4b.natappfree.cc/page/Index.html&response_type=code&scope=snsapi_userinfo&state=gzh#wechat_redirect
    // https://api.weixin.qq.com/sns/oauth2/access_token?appid=wxb50d02d2fd72d2d2&secret=60a34a5c4159d5092b9e557ac2aa63b9&code=0819ZELf1wqDLx0iy3If13gBLf19ZEL7&grant_type=authorization_code
    // {access_token=1X3GsW3imLHaFOjAvu701pASllYNG2Tl-PyzPSqfidjvCZnWdYNIPDXvvKbzeKK_6ibhtjvKMOF2ZzXJ_3uQDQ, expires_in=7200, refresh_token=iGHHuwvFnmTIJ9HmqPyPaGjTDSRYWloFkS7rn5WB6nDm3g4wAtz27eFtN-B1ajBEdKWp3g3woEYhZOmqL3lV8g, openid=oL2F31vtHbKxZxWEY0f-yOI7lIdE, scope=snsapi_userinfo}
    // userInfoStr = {openid=oL2F31vtHbKxZxWEY0f-yOI7lIdE, nickname=月星墙, sex=1, language=zh_CN, city=武汉, province=湖北, country=中国, headimgurl=http://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83erKS3ICAPZFkFyLkhfcD6Ftb0bKmG0nNE9Eusg2IXyLXrwyZID2cS9mT7TS28ecTxNh02ZouXvC8w/0, privilege=[]}
    public LinkedHashMap getUserAccessTokenAndOpenid(String code) {
        String url = String.format(AccesstokeOpenidUrl, wxAppId, wxAppSecret, code);

        UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(url);
        URI uri = builder.build().encode().toUri();

        LinkedHashMap resp = restTemplate.getForObject(uri, LinkedHashMap.class);
        logger.info("getUserAccessTokenAndOpenid resp = " + resp);

        if(resp.containsKey("errcode")) {
            throw new RuntimeException("获取token错误信息，msg = " + resp);
        } else {
            return resp;
        }
    }

    public String getOpenId(String accessToken) {
        return null;
    }

    public LinkedHashMap getUserInfo(String accessToken, String openId){
        String url = String.format(UserInfoUrl, accessToken, openId);
        UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(url);
        URI uri = builder.build().encode().toUri();

        LinkedHashMap resp = restTemplate.getForObject(uri, LinkedHashMap.class);
        logger.info("getUserInfo resp = " + resp);

        if(resp.containsKey("errcode")) {
            throw new RuntimeException("获取用户信息错误，msg = "+resp);
        } else {
            return resp;
        }
    }

    public LinkedHashMap getUserAccessTokenByRefreshToken(String refreshToken) {

        String url = String.format(RefreshTokenUrl, wxAppId, refreshToken);

        UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(url);
        URI uri = builder.build().encode().toUri();

        LinkedHashMap resp = restTemplate.getForObject(uri, LinkedHashMap.class);
        logger.info("getUserAccessTokenByRefreshToken resp = " + resp);

        if(resp.containsKey("errcode")) {
            throw new RuntimeException("重新获取AccessToken失败，msg = "+resp);
        } else {
            return resp;
        }
    }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222695, 1157235318189994468, 1157235320526222693, 'WxTemplateMsg.java', 'package cn.aezo.minions.utils;

import cn.aezo.utils.base.StringU;
import cn.aezo.utils.base.ValidU;
import cn.aezo.utils.io.HttpClientU;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service
public class WxTemplateMsg {
    @Autowired
    private WxTokenManager wxTokenManager;

    private static String protocolAndDomain;

    private static final String TEMPLATE_MSG_URL =
            "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=%s";

    /**
     * 发送模板消息
     * @param toUserOpenId 目标用户的openid
     * @param templateId 模板消息id
     * @param gotoUrl 跳转地址
     * @param data 模板参数
     */
    public Object sendMsg(String toUserOpenId, String templateId, String gotoUrl, Map data) {
        Object result = null;
        String accessToken = wxTokenManager.getAccessToken();
        if(ValidU.isEmpty(accessToken)) return result;

        String url = String.format(TEMPLATE_MSG_URL, accessToken);

        Map<String, Object> context = new HashMap<>();
        context.put("touser", toUserOpenId);
        context.put("template_id", templateId);
        context.put("url", gotoUrl);
        context.put("data", data);

        String msg = StringU.parseMap2JsonStr(context);

        String str = HttpClientU.httpRequest(url, "POST", msg);
        if(str == null) {
            return null;
        } else {
            try {
                result = StringU.parseJsonStr2Map(str);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

        return result;
    }

    public String getProtocolAndDomain() {
        return protocolAndDomain;
    }

    @Value("${help.protocolAndDomain}")
    public void setProtocolAndDomain(String protocolAndDomain) {
        this.protocolAndDomain = protocolAndDomain;
    }

    public enum Template {
        PaymentSuccess("DKuKSlWNnYD6XRtgxI_wiGvaI2CEGW-OsMddJN2GzQk", "index.html");

        private String id;
        private String url;

        Template(String id, String url) {
            this.id = id;
            this.url = url;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getUrl() {
            return protocolAndDomain + url;
        }

        public void setUrl(String url) {
            this.url = url;
        }
    }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222696, 1157235318189994468, 1157235320526222693, 'WxTokenManager.java', 'package cn.aezo.minions.utils;

import cn.aezo.utils.base.MiscU;
import cn.aezo.utils.base.ValidU;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import org.springframework.web.client.RestTemplate;

import java.util.Date;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;

@Service
public class WxTokenManager {
    private Logger logger = LoggerFactory.getLogger(WxTokenManager.class);

    @Autowired
    private RedisTemplate<String, String> redisTemplate;

    @Autowired
    private RestTemplate restTemplate;

    @Autowired
    private WxAuthService wxAuthService;

    @Value("${help.wxAppId}")
    private String wxAppId;

    @Value("${help.wxAppSecret}")
    private String wxAppSecret;

    @Value("${help.wxAccessToken}")
    private String wxAccessToken;

    @Value("${help.wxJsapiTicket}")
    private String wxJsapiTicket;

    private static final String AccesstokeUrl =
            "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s";

    private static final String JsapiTicketUrl =
            "https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=%s&type=jsapi";

    public String getAccessToken() {
        String accessToken = getRedisValueNotExpires(wxAccessToken, null);
        if(ValidU.isEmpty(accessToken)) {
            String url = String.format(AccesstokeUrl, wxAppId, wxAppSecret);

            LinkedHashMap resp = restTemplate.getForObject(url, LinkedHashMap.class);
            logger.info("getAccessToken resp = " + resp);

            if(resp.containsKey("errcode")) {
                throw new RuntimeException("获取token错误信息，msg = " + resp);
            } else {
                accessToken = (String) resp.get("access_token");
                Object expiresIn = resp.get("expires_in");
                setRedisValueWithExpires(wxAccessToken, null, accessToken, expiresIn);
            }
        }

        return accessToken;
    }

    public String getJsapiTicket(String accessToken) {
        String jsapiTicket = getRedisValueNotExpires(wxJsapiTicket, null);
        if(ValidU.isEmpty(jsapiTicket)) {
            String url = String.format(JsapiTicketUrl, accessToken);

            LinkedHashMap resp = restTemplate.getForObject(url, LinkedHashMap.class);
            logger.info("getJsSDKInfo resp = " + resp);

            if(StringUtils.isEmpty(resp.get("errmsg")) || !"ok".equals(resp.get("errmsg"))) {
                throw new RuntimeException("获取ticket错误信息，msg = " + resp);
            } else {
                jsapiTicket = (String) resp.get("ticket");
                Object expiresIn = resp.get("expires_in");
                setRedisValueWithExpires(wxAccessToken, null, jsapiTicket, expiresIn);
            }
        }

        return jsapiTicket;
    }

    public Map<String, Object> getJsSDKInfo(String accessToken) {
        Map<String, Object> retMap = new HashMap<>();

        String jsapiTicket = getJsapiTicket(accessToken);
        if(StringUtils.isEmpty(jsapiTicket)) return retMap;

        return MiscU.Instance.toMap("jsapiTicket", jsapiTicket);
    }

    public String getOpenid(String code) {
        String openid = null;
        if(StringUtils.isEmpty(code)) return openid;

        LinkedHashMap wxMap = wxAuthService.getUserAccessTokenAndOpenid(code);
        if (wxMap == null) return openid;

        openid = (String) wxMap.get("openid");

        return openid;
    }

    /**
     * 获取没有超期的值，超期返回null
     * @param redisKey
     * @param mapKey
     * @return
     */
    private String getRedisValueNotExpires(String redisKey, String mapKey) {
        String value = null;
        if(StringUtils.isEmpty(redisKey)) return value;

        long now = (new Date()).getTime();
        value = redisTemplate.opsForValue().get(redisKey);
        if(StringUtils.isEmpty(value)) return value;

        String[] arr = value.split("#");
        if(now > Long.valueOf(arr[1])) {
            return null;
        } else {
            return value;
        }
    }

    /**
     * 设置过期时间
     * @param redisKey
     * @param mapKey
     * @param value
     * @param expiresIn
     */
    private void setRedisValueWithExpires(String redisKey, String mapKey, String value, Object expiresIn) {
        String valueTemp = null;
        if (!StringUtils.isEmpty(value)) {
            valueTemp = value + "#" + getNowExpiresIn(expiresIn);
        }
        if(valueTemp == null) return;

        if(StringUtils.isEmpty(mapKey)) {
            redisTemplate.opsForValue().set(redisKey, valueTemp);
        } else {
            redisTemplate.opsForHash().put(redisKey, mapKey, valueTemp);
        }
    }

    /**
     * 获取超期时间
     * @param expiresIn
     * @return
     */
    private Long getNowExpiresIn(Object expiresIn) {
        long now = (new Date()).getTime();
        if(expiresIn == null) return now;

        Long expiresMs = Long.valueOf(String.valueOf(expiresIn)) - 15 * 60;
        return expiresMs * 1000 + now;
    }
}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222697, 1157235318189994468, 1157235320526222655, 'utils', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222698, 1157235318189994468, 0, '${(sbhCtx.mvnMainResourcesDir)!}', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222699, 1157235318189994468, 1157235320526222698, '${(sbhCtx.renderNotRender)!}logback-spring.xml', '<?xml version="1.0" encoding="UTF-8" ?>
<configuration scan="true" scanPeriod="60 seconds" debug="false">
    <!--<include resource="org/springframework/boot/logging/logback/base.xml"/>-->
    <conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" />
    <conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" />
    <conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" />

    <springProperty scope="context" name="springApplicationName" source="spring.application.name"/>
    <property name="LOG_PATH" value="${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp/app/logs}}}" />
    <property name="STDOUT_LOG_PATTERN" value="${CONSOLE_LOG_PATTERN:-%clr(%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
    <property name="LOG_FILE_MAX_HISTORY" value="${LOG_FILE_MAX_HISTORY:-7}"/>
    <property name="LOG_FILE_MAX_SIZE" value="${LOG_FILE_MAX_SIZE:-10MB}"/>

    <!-- 控制台输出日志 -->
    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>${STDOUT_LOG_PATTERN}</pattern>
        </encoder>
    </appender>

    <!-- ERROR级别日志 -->
    <appender name="ERROR" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <filter class="ch.qos.logback.classic.filter.LevelFilter">
            <level>ERROR</level>
            <onMatch>ACCEPT</onMatch>
            <onMismatch>DENY</onMismatch>
        </filter>
        <!-- 最常用的滚动策略，它根据时间来制定滚动策略.既负责滚动也负责出发滚动 -->
        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
            <!--日志输出位置, 可相对和绝对路径 -->
            <fileNamePattern>${LOG_PATH}/%d{yyyyMMdd}/error-%i.log</fileNamePattern>
            <!-- 可选节点，控制保留的归档文件的最大数量，超出数量就删除旧文件假设设置每个月滚动，且<maxHistory>是3，
            则只保存最近3个月的文件，删除之前的旧文件。注意，删除旧文件是，那些为了归档而创建的目录也会被删除-->
            <maxFileSize>${LOG_FILE_MAX_SIZE}</maxFileSize>
            <maxHistory>${LOG_FILE_MAX_HISTORY}</maxHistory>
        </rollingPolicy>

        <encoder>
            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n</pattern>
        </encoder>
    </appender>

    <!-- WARN级别日志 appender -->
    <appender name="WARN" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <filter class="ch.qos.logback.classic.filter.LevelFilter">
            <level>WARN</level>
            <onMatch>ACCEPT</onMatch>
            <onMismatch>DENY</onMismatch>
        </filter>
        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
            <fileNamePattern>${LOG_PATH}/%d{yyyyMMdd}/warn-%i.log</fileNamePattern>
            <maxFileSize>${LOG_FILE_MAX_SIZE}</maxFileSize>
            <maxHistory>${LOG_FILE_MAX_HISTORY}</maxHistory>
        </rollingPolicy>
        <encoder>
            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n</pattern>
        </encoder>
    </appender>

    <!-- INFO级别日志 appender -->
    <appender name="INFO" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <filter class="ch.qos.logback.classic.filter.LevelFilter">
            <level>INFO</level>
            <onMatch>ACCEPT</onMatch>
            <onMismatch>DENY</onMismatch>
        </filter>
        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
            <fileNamePattern>${LOG_PATH}/%d{yyyyMMdd}/info-%i.log</fileNamePattern>
            <maxFileSize>${LOG_FILE_MAX_SIZE}</maxFileSize>
            <maxHistory>${LOG_FILE_MAX_HISTORY}</maxHistory>
        </rollingPolicy>
        <encoder>
            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n</pattern>
        </encoder>
    </appender>

    <!-- DEBUG级别日志 appender。如果root中不使用此appender则可将其注释掉 -->
    <appender name="DEBUG" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <filter class="ch.qos.logback.classic.filter.LevelFilter">
            <level>DEBUG</level>
            <onMatch>ACCEPT</onMatch>
            <onMismatch>DENY</onMismatch>
        </filter>
        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
            <fileNamePattern>${LOG_PATH}/%d{yyyyMMdd}/debug-%i.log</fileNamePattern>
            <maxFileSize>${LOG_FILE_MAX_SIZE}</maxFileSize>
            <maxHistory>${LOG_FILE_MAX_HISTORY}</maxHistory>
        </rollingPolicy>
        <encoder>
            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n</pattern>
        </encoder>
    </appender>

    <!-- TRACE级别日志 appender -->
    <appender name="TRACE" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <filter class="ch.qos.logback.classic.filter.LevelFilter">
            <level>TRACE</level>
            <onMatch>ACCEPT</onMatch>
            <onMismatch>DENY</onMismatch>
        </filter>
        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
            <fileNamePattern>${LOG_PATH}/%d{yyyyMMdd}/trace-%i.log</fileNamePattern>
            <maxFileSize>${LOG_FILE_MAX_SIZE}</maxFileSize>
            <maxHistory>${LOG_FILE_MAX_HISTORY}</maxHistory>
        </rollingPolicy>
        <encoder>
            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n</pattern>
        </encoder>
    </appender>

    <!--输出到mysql数据库的appender配置. 需要pom中引入mysql的jar包，并创建数据库logback_data，并需要先创建数据库表-->
    <!--
    <appender name="DB" class="ch.qos.logback.classic.db.DBAppender">
        <connectionSource
                class="ch.qos.logback.core.db.DriverManagerConnectionSource">
            <driverClass>com.mysql.jdbc.Driver</driverClass>
            <url>jdbc:mysql://localhost:3306/logback_data?characterEncoding=utf8</url>
            <user>root</user>
            <password>root</password>
        </connectionSource>
    </appender>
    -->

    <logger name="org.apache.catalina.startup.DigesterFactory" level="ERROR"/>
    <logger name="org.apache.catalina.util.LifecycleBase" level="ERROR"/>
    <logger name="org.apache.coyote.http11.Http11NioProtocol" level="WARN"/>
    <logger name="org.apache.sshd.common.util.SecurityUtils" level="WARN"/>
    <logger name="org.apache.tomcat.util.net.NioSelectorPool" level="WARN"/>
    <logger name="org.eclipse.jetty.util.component.AbstractLifeCycle" level="ERROR"/>
    <logger name="org.hibernate.validator.internal.util.Version" level="WARN"/>

    <!--<logger name="org.hibernate" level="ERROR"/>-->
    <!--<logger name="org.springframework" level="ERROR"/>-->
    <!--<logger name="org.apache.zookeeper" level="ERROR"/>-->
    <!--<logger name="com.netflix" level="ERROR"/>-->

	<!-- hibernate日志输入 -->
	<!-- <logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="TRACE" />
	<logger name="org.hibernate.type.descriptor.sql.BasicExtractor" level="TRACE" />
	<logger name="org.hibernate.SQL" level="INFO" />
	<logger name="org.hibernate.engine.QueryParameters" level="INFO" />
	<logger name="org.hibernate.engine.query.HQLQueryPlan" level="INFO" /> -->

    <!--mybatis打印日志，此时是debug级别，则会生成到debug-%i.log的文件中-->
    <!-- <logger name="cn.aezo.video.dao" level="DEBUG"/> -->

    <root level="WARN">
		<!--输出到数据库-->
        <!--<appender-ref ref="DB"/>-->

        <!-- 控制台输出 -->
        <appender-ref ref="STDOUT" />

        <!-- 文件输出：如果使用文件输出，则下面的打开级别的才会记录 -->
        <appender-ref ref="ERROR" />
        <appender-ref ref="INFO" />
        <appender-ref ref="WARN" />
        <!-- <appender-ref ref="DEBUG" /> -->
        <!--<appender-ref ref="TRACE" />-->
    </root>
</configuration>', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222700, 1157235318189994468, 1157235320526222698, 'application-dev.yml', 'spring:
  datasource:
    url: ${(projectConfig.databaseUrl)!''jdbc:mysql://localhost/minionsdemo?useUnicode=true&characterEncoding=utf-8&useSSL=false''}

server:
  port: ${(projectConfig.serverPort)!''8080''}', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222701, 1157235318189994468, 1157235320526222698, 'application-prod.yml', 'spring:
  datasource:
    url: ${(projectConfig.databaseUrl)!''jdbc:mysql://localhost/minionsdemo?useUnicode=true&characterEncoding=utf-8''}

server:
  port: ${(projectConfig.serverPort)!''8080''}', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222702, 1157235318189994468, 1157235320526222698, 'application-test.yml', 'spring:
  datasource:
    url: ${(projectConfig.databaseUrl)!''jdbc:mysql://localhost/minionsdemo?useUnicode=true&characterEncoding=utf-8''}

server:
  port: ${(projectConfig.serverPort)!''8080''}', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222703, 1157235318189994468, 1157235320526222698, 'application.yml', 'server:
  port: ${(projectConfig.serverPort)!''8080''}

spring:
  profiles:
    active: dev
  datasource:
    url: ${(projectConfig.databaseUrl)!''jdbc:mysql://localhost:3306/minionsdemo?useUnicode=true&characterEncoding=utf-8&useSSL=false''}
    username: ${(projectConfig.databaseUsername)!''root''}
    password: ${(projectConfig.databasePassword)!''root''}
    driver-class-name: ${(projectConfig.databaseDriver)!''com.mysql.jdbc.Driver''}
  messages:
    basename: i18n/messages', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222704, 1157235318189994468, 1157235320526222698, 'i18n', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222705, 1157235318189994468, 1157235320526222704, 'messages.properties', '', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222706, 1157235318189994468, 1157235320526222704, 'messages_zh_CN.properties', 'error.argument_missing=缺少必须参数
error.argument_parse_error=参数解析
error.argument_invalid=无效参数
error.auth_login_failed=登录失败
error.auth_token_invalid=无效的Token
error.method_not_supported=无相应服务
error.todo_error=待完善异常
error.exception=运行错误
error.unknown_exception=未知错误', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222707, 1157235318189994468, 1157235320526222698, 'mapper', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222708, 1157235318189994468, 1157235320526222698, 'sql', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222709, 1157235318189994468, 1157235320526222698, 'static', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222710, 1157235318189994468, 1157235320526222698, 'templates', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222711, 1157235318189994468, 1157235320526222710, 'error', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222712, 1157235318189994468, 1157235320526222710, 'includes', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222713, 1157235318189994468, 1157235320526222710, 'pages', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222714, 1157235318189994468, 0, '${(sbhCtx.mvnTestJavaProjectBaseDir)!}', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222715, 1157235318189994468, 1157235320526222714, '${(sbhCtx.baseApplicationName)!}ApplicationTests.java', 'package ${projectConfig.projectPackageName};

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest
public class ${(sbhCtx.baseApplicationName)!}ApplicationTests {

	@Test
	public void contextLoads() {
	}

}
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222716, 1157235318189994468, 1157235320526222714, 'dao', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222717, 1157235318189994468, 1157235320526222714, 'service', null, 1, 1);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222718, 1157235318189994468, 0, '${(sbhCtx.renderNotRender)!}.gitignore', 'target/
!.mvn/wrapper/maven-wrapper.jar

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr

### NetBeans ###
nbproject/private/
build/
nbbuild/
dist/
nbdist/
.nb-gradle/

### Minions ###
LOG_PATH_IS_UNDEFINED', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222719, 1157235318189994468, 0, '${(sbhCtx.renderNotRender)!}mvnw', '#!/bin/sh
# ----------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
# ----------------------------------------------------------------------------

# ----------------------------------------------------------------------------
# Maven2 Start Up Batch script
#
# Required ENV vars:
# ------------------
#   JAVA_HOME - location of a JDK home dir
#
# Optional ENV vars
# -----------------
#   M2_HOME - location of maven2''s installed home dir
#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
#     e.g. to debug Maven itself, use
#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
# ----------------------------------------------------------------------------

if [ -z "$MAVEN_SKIP_RC" ] ; then

  if [ -f /etc/mavenrc ] ; then
    . /etc/mavenrc
  fi

  if [ -f "$HOME/.mavenrc" ] ; then
    . "$HOME/.mavenrc"
  fi

fi

# OS specific support.  $var _must_ be set to either true or false.
cygwin=false;
darwin=false;
mingw=false
case "`uname`" in
  CYGWIN*) cygwin=true ;;
  MINGW*) mingw=true;;
  Darwin*) darwin=true
    # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
    # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
    if [ -z "$JAVA_HOME" ]; then
      if [ -x "/usr/libexec/java_home" ]; then
        export JAVA_HOME="`/usr/libexec/java_home`"
      else
        export JAVA_HOME="/Library/Java/Home"
      fi
    fi
    ;;
esac

if [ -z "$JAVA_HOME" ] ; then
  if [ -r /etc/gentoo-release ] ; then
    JAVA_HOME=`java-config --jre-home`
  fi
fi

if [ -z "$M2_HOME" ] ; then
  ## resolve links - $0 may be a link to maven''s home
  PRG="$0"

  # need this for relative symlinks
  while [ -h "$PRG" ] ; do
    ls=`ls -ld "$PRG"`
    link=`expr "$ls" : ''.*-> \(.*\)$''`
    if expr "$link" : ''/.*'' > /dev/null; then
      PRG="$link"
    else
      PRG="`dirname "$PRG"`/$link"
    fi
  done

  saveddir=`pwd`

  M2_HOME=`dirname "$PRG"`/..

  # make it fully qualified
  M2_HOME=`cd "$M2_HOME" && pwd`

  cd "$saveddir"
  # echo Using m2 at $M2_HOME
fi

# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
  [ -n "$M2_HOME" ] &&
    M2_HOME=`cygpath --unix "$M2_HOME"`
  [ -n "$JAVA_HOME" ] &&
    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
  [ -n "$CLASSPATH" ] &&
    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
fi

# For Migwn, ensure paths are in UNIX format before anything is touched
if $mingw ; then
  [ -n "$M2_HOME" ] &&
    M2_HOME="`(cd "$M2_HOME"; pwd)`"
  [ -n "$JAVA_HOME" ] &&
    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
  # TODO classpath?
fi

if [ -z "$JAVA_HOME" ]; then
  javaExecutable="`which javac`"
  if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : ''\([^ ]*\)''`" = "no" ]; then
    # readlink(1) is not available as standard on Solaris 10.
    readLink=`which readlink`
    if [ ! `expr "$readLink" : ''\([^ ]*\)''` = "no" ]; then
      if $darwin ; then
        javaHome="`dirname \"$javaExecutable\"`"
        javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
      else
        javaExecutable="`readlink -f \"$javaExecutable\"`"
      fi
      javaHome="`dirname \"$javaExecutable\"`"
      javaHome=`expr "$javaHome" : ''\(.*\)/bin''`
      JAVA_HOME="$javaHome"
      export JAVA_HOME
    fi
  fi
fi

if [ -z "$JAVACMD" ] ; then
  if [ -n "$JAVA_HOME"  ] ; then
    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
      # IBM''s JDK on AIX uses strange locations for the executables
      JAVACMD="$JAVA_HOME/jre/sh/java"
    else
      JAVACMD="$JAVA_HOME/bin/java"
    fi
  else
    JAVACMD="`which java`"
  fi
fi

if [ ! -x "$JAVACMD" ] ; then
  echo "Error: JAVA_HOME is not defined correctly." >&2
  echo "  We cannot execute $JAVACMD" >&2
  exit 1
fi

if [ -z "$JAVA_HOME" ] ; then
  echo "Warning: JAVA_HOME environment variable is not set."
fi

CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher

# traverses directory structure from process work directory to filesystem root
# first directory with .mvn subdirectory is considered project base directory
find_maven_basedir() {

  if [ -z "$1" ]
  then
    echo "Path not specified to find_maven_basedir"
    return 1
  fi

  basedir="$1"
  wdir="$1"
  while [ "$wdir" != ''/'' ] ; do
    if [ -d "$wdir"/.mvn ] ; then
      basedir=$wdir
      break
    fi
    # workaround for JBEAP-8937 (on Solaris 10/Sparc)
    if [ -d "${wdir}" ]; then
      wdir=`cd "$wdir/.."; pwd`
    fi
    # end of workaround
  done
  echo "${basedir}"
}

# concatenates all lines of a file
concat_lines() {
  if [ -f "$1" ]; then
    echo "$(tr -s ''\n'' '' '' < "$1")"
  fi
}

BASE_DIR=`find_maven_basedir "$(pwd)"`
if [ -z "$BASE_DIR" ]; then
  exit 1;
fi

export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
echo $MAVEN_PROJECTBASEDIR
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"

# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
  [ -n "$M2_HOME" ] &&
    M2_HOME=`cygpath --path --windows "$M2_HOME"`
  [ -n "$JAVA_HOME" ] &&
    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
  [ -n "$CLASSPATH" ] &&
    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
  [ -n "$MAVEN_PROJECTBASEDIR" ] &&
    MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
fi

WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain

exec "$JAVACMD" \
  $MAVEN_OPTS \
  -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
  "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
  ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222720, 1157235318189994468, 0, '${(sbhCtx.renderNotRender)!}mvnw.cmd', '@REM ----------------------------------------------------------------------------
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements.  See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership.  The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License.  You may obtain a copy of the License at
@REM
@REM    http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied.  See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM ----------------------------------------------------------------------------

@REM ----------------------------------------------------------------------------
@REM Maven2 Start Up Batch script
@REM
@REM Required ENV vars:
@REM JAVA_HOME - location of a JDK home dir
@REM
@REM Optional ENV vars
@REM M2_HOME - location of maven2''s installed home dir
@REM MAVEN_BATCH_ECHO - set to ''on'' to enable the echoing of the batch commands
@REM MAVEN_BATCH_PAUSE - set to ''on'' to wait for a key stroke before ending
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
@REM     e.g. to debug Maven itself, use
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
@REM ----------------------------------------------------------------------------

@REM Begin all REM lines with ''@'' in case MAVEN_BATCH_ECHO is ''on''
@echo off
@REM enable echoing my setting MAVEN_BATCH_ECHO to ''on''
@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%

@REM set %HOME% to equivalent of $HOME
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")

@REM Execute a user defined script before this one
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
:skipRcPre

@setlocal

set ERROR_CODE=0

@REM To isolate internal variables from possible post scripts, we use another setlocal
@setlocal

@REM ==== START VALIDATION ====
if not "%JAVA_HOME%" == "" goto OkJHome

echo.
echo Error: JAVA_HOME not found in your environment. >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error

:OkJHome
if exist "%JAVA_HOME%\bin\java.exe" goto init

echo.
echo Error: JAVA_HOME is set to an invalid directory. >&2
echo JAVA_HOME = "%JAVA_HOME%" >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error

@REM ==== END VALIDATION ====

:init

@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
@REM Fallback to current working directory if not found.

set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir

set EXEC_DIR=%CD%
set WDIR=%EXEC_DIR%
:findBaseDir
IF EXIST "%WDIR%"\.mvn goto baseDirFound
cd ..
IF "%WDIR%"=="%CD%" goto baseDirNotFound
set WDIR=%CD%
goto findBaseDir

:baseDirFound
set MAVEN_PROJECTBASEDIR=%WDIR%
cd "%EXEC_DIR%"
goto endDetectBaseDir

:baseDirNotFound
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
cd "%EXEC_DIR%"

:endDetectBaseDir

IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig

@setlocal EnableExtensions EnableDelayedExpansion
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%

:endReadAdditionalConfig

SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"

set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain

%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
if ERRORLEVEL 1 goto error
goto end

:error
set ERROR_CODE=1

:end
@endlocal & set ERROR_CODE=%ERROR_CODE%

if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
@REM check for post script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
:skipRcPost

@REM pause the script if MAVEN_BATCH_PAUSE is set to ''on''
if "%MAVEN_BATCH_PAUSE%" == "on" pause

if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%

exit /B %ERROR_CODE%
', 1, 2);
INSERT INTO PUBLIC.TEMPLATE_ITEM (TEMPLATE_ITEM_ID, TEMPLATE_ID, PID, ITEM_NAME, ITEM_VALUE, VALID_STATUS, ITEM_TYPE) VALUES (1157235320526222721, 1157235318189994468, 0, 'pom.xml', '<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>${(projectConfig.projectPackageName)!}</groupId>
    <artifactId>${(projectConfig.projectName)!}</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>${(projectConfig.projectName)!}</name>
    <description>generated by minions</description>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.1.RELEASE</version>
        <relativePath/>
    </parent>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
    </properties>

    <repositories>
        <repository>
            <id>oldinaction-maven-repo</id>
            <url>https://raw.github.com/oldinaction/maven-repo/master/</url>
        </repository>
    </repositories>

    <dependencies>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <!-- DB start -->
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-boot-starter</artifactId>
            <version>3.0.6</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
        </dependency>
        <!-- DB end -->

        <#if "${(sbhCtx.addonSecurityType)!}" == "SpringSecurity">
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        </#if>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>

        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt</artifactId>
            <version>0.6.0</version>
        </dependency>


        <dependency>
            <groupId>cn.aezo</groupId>
            <artifactId>utils</artifactId>
            <version>sm-minions-1.1</version>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.16.20</version>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
        </plugins>

        <resources>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.*</include>
                </includes>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
            </resource>
            <resource>
                <directory>${r"${project.basedir}"}/src/main/resources</directory>
                <filtering>true</filtering>
                <excludes>
                    <exclude>**/*.woff</exclude>
                    <exclude>**/*.ttf</exclude>
                </excludes>
            </resource>
            <resource>
                <directory>${r"${project.basedir}"}/src/main/resources</directory>
                <filtering>false</filtering>
                <includes>
                    <include>**/*.woff</include>
                    <include>**/*.ttf</include>
                </includes>
            </resource>
        </resources>
    </build>
</project>
', 1, 2);